function ModerationLocaleTest::hasModerationForm

Same name in other branches
  1. 8.9.x core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::hasModerationForm()
  2. 10 core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php \Drupal\Tests\content_moderation\Functional\ModerationLocaleTest::hasModerationForm()
  3. 11.x 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 576

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"]');
}

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