function ExperimentalHelpTest::testExperimentalHelp
Same name in other branches
- 9 core/modules/help/tests/src/Functional/ExperimentalHelpTest.php \Drupal\Tests\help\Functional\ExperimentalHelpTest::testExperimentalHelp()
- 8.9.x core/modules/help/tests/src/Functional/ExperimentalHelpTest.php \Drupal\Tests\help\Functional\ExperimentalHelpTest::testExperimentalHelp()
- 11.x 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 53
Class
- ExperimentalHelpTest
- Verifies help for experimental modules.
Namespace
Drupal\Tests\help\FunctionalCode
public function testExperimentalHelp() : void {
$this->drupalLogin($this->adminUser);
$this->drupalGet('admin/help/experimental_module_test');
$this->assertSession()
->statusMessageContains('This module is experimental.', 'warning');
// Regular modules should not display the message.
$this->drupalGet('admin/help/help_page_test');
$this->assertSession()
->statusMessageNotContains('This module is experimental.');
// Ensure the actual help page is displayed to avoid a false positive.
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextContains('online documentation for the Help Page Test module');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.