You are here

public function ModerationLocaleTest::hasModerationForm 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::hasModerationForm()

Checks whether the page contains the moderation form.

Return value

bool TRUE if the moderation form could be find in the page, FALSE otherwise.

3 calls to ModerationLocaleTest::hasModerationForm()
ModerationLocaleTest::assertModerationForm in core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
Asserts that the moderation form is displayed for the specified node.
ModerationLocaleTest::assertNoModerationForm in core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php
Asserts that the moderation form is not displayed 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 568

Class

ModerationLocaleTest
Test content_moderation functionality with localization and translation.

Namespace

Drupal\Tests\content_moderation\Functional

Code

public function hasModerationForm() {
  return (bool) $this
    ->xpath('//ul[@class="entity-moderation-form"]');
}