public function ExperimentalHelpTest::testExperimentalHelp in Drupal 9
Same name and namespace in other branches
- 8 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\FunctionalCode
public function testExperimentalHelp() {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/help/experimental_module_test');
$this
->assertSession()
->pageTextContains('This module is experimental.');
// Regular modules should not display the message.
$this
->drupalGet('admin/help/help_page_test');
$this
->assertSession()
->pageTextNotContains('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');
}