function ModerationLocaleTest::assertNotLatestVersionPage

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

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

Parameters

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

bool $moderation_form: (optional) Whether the page should contain the moderation form. Defaults to FALSE.

2 calls to ModerationLocaleTest::assertNotLatestVersionPage()
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 518

Class

ModerationLocaleTest
Test content_moderation functionality with localization and translation.

Namespace

Drupal\Tests\content_moderation\Functional

Code

public function assertNotLatestVersionPage(NodeInterface $node, $moderation_form = FALSE) {
    $this->assertNotEquals($node->toUrl('latest-version')
        ->setAbsolute()
        ->toString(), $this->getSession()
        ->getCurrentUrl());
    if ($moderation_form) {
        $this->assertModerationForm($node, FALSE);
    }
    else {
        $this->assertNoModerationForm($node);
    }
}

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