You are here

public function ModerationLocaleTest::assertNotLatestVersionPage in Drupal 9

Same name and namespace in other branches
  1. 8 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 523

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);
  }
}