function ModerationLocaleTest::assertModerationForm
Same name in other branches
- 9 core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::assertModerationForm()
- 8.9.x core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::assertModerationForm()
- 10 core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::assertModerationForm()
Asserts that the moderation form is displayed for the specified node.
@internal
Parameters
\Drupal\node\NodeInterface $node: A node object.
bool $latest_tab: (optional) Whether the node form is expected to be displayed on the latest version page or on the node view page. Defaults to the former.
3 calls to ModerationLocaleTest::assertModerationForm()
- ModerationLocaleTest::assertLatestVersionPage in core/
modules/ content_moderation/ tests/ src/ Functional/ ModerationLocaleTest.php - Asserts that this is the "latest version" page for the specified node.
- 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 650
Class
- ModerationLocaleTest
- Test content_moderation functionality with localization and translation.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
public function assertModerationForm(NodeInterface $node, bool $latest_tab = TRUE) : void {
$this->drupalGet($node->toUrl());
$this->assertEquals(!$latest_tab, $this->hasModerationForm());
$this->drupalGet($node->toUrl('latest-version'));
$this->assertEquals($latest_tab, $this->hasModerationForm());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.