function ModerationLocaleTest::assertLatestVersionPage

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

Asserts that this is the "latest version" page for the specified node.

Parameters

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

2 calls to ModerationLocaleTest::assertLatestVersionPage()
ModerationLocaleTest::testLanguageIndependentContentModeration in core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
Tests that individual translations can be moderated independently.
ModerationLocaleTest::testNewTranslationSourceValues in core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
Checks that new translation values are populated properly.

File

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

Class

ModerationLocaleTest
Test content_moderation functionality with localization and translation.

Namespace

Drupal\Tests\content_moderation\Functional

Code

public function assertLatestVersionPage(NodeInterface $node) {
    $this->assertEquals($node->toUrl('latest-version')
        ->setAbsolute()
        ->toString(), $this->getSession()
        ->getCurrentUrl());
    $this->assertModerationForm($node);
}

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