function ModerationLocaleTest::assertNoModerationForm

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::assertNoModerationForm()
  2. 8.9.x core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::assertNoModerationForm()
  3. 10 core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::assertNoModerationForm()

Asserts that the moderation form is not displayed for the specified node.

@internal

Parameters

\Drupal\node\NodeInterface $node: A node object.

2 calls to ModerationLocaleTest::assertNoModerationForm()
ModerationLocaleTest::assertNotLatestVersionPage in core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
Asserts that this is not the "latest version" page for the specified node.
ModerationLocaleTest::testLanguageIndependentContentModeration in core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
Tests that individual translations can be moderated independently.

File

core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php, line 664

Class

ModerationLocaleTest
Test content_moderation functionality with localization and translation.

Namespace

Drupal\Tests\content_moderation\Functional

Code

public function assertNoModerationForm(NodeInterface $node) : void {
    $this->drupalGet($node->toUrl());
    $this->assertFalse($this->hasModerationForm());
    $this->drupalGet($node->toUrl('latest-version'));
    $this->assertEquals(403, $this->getSession()
        ->getStatusCode());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.