You are here

public function ExperimentalHelpTest::testExperimentalHelp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/help/tests/src/Functional/ExperimentalHelpTest.php \Drupal\Tests\help\Functional\ExperimentalHelpTest::testExperimentalHelp()

Verifies that a warning message is displayed for experimental modules.

File

core/modules/help/tests/src/Functional/ExperimentalHelpTest.php, line 51

Class

ExperimentalHelpTest
Verifies help for experimental modules.

Namespace

Drupal\Tests\help\Functional

Code

public function testExperimentalHelp() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('admin/help/experimental_module_test');
  $this
    ->assertText('This module is experimental.');

  // Regular modules should not display the message.
  $this
    ->drupalGet('admin/help/help_page_test');
  $this
    ->assertNoText('This module is experimental.');

  // Ensure the actual help page is displayed to avoid a false positive.
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->assertText('online documentation for the Help Page Test module');
}