protected function InstallUninstallTest::assertHelp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php \Drupal\Tests\system\Functional\Module\InstallUninstallTest::assertHelp()
- 10 core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php \Drupal\Tests\system\Functional\Module\InstallUninstallTest::assertHelp()
Verifies a module's help.
Verifies that the module help page from hook_help() exists and can be displayed, and that it contains the phrase "Foo Bar module", where "Foo Bar" is the name of the module from the .info.yml file.
Parameters
string $module: Machine name of the module to verify.
string $name: Human-readable name of the module to verify.
1 call to InstallUninstallTest::assertHelp()
- InstallUninstallTest::testInstallUninstall in core/
modules/ system/ tests/ src/ Functional/ Module/ InstallUninstallTest.php - Tests that a fixed set of modules can be installed and uninstalled.
File
- core/
modules/ system/ tests/ src/ Functional/ Module/ InstallUninstallTest.php, line 354
Class
- InstallUninstallTest
- Install/uninstall core module and confirm table creation/deletion.
Namespace
Drupal\Tests\system\Functional\ModuleCode
protected function assertHelp($module, $name) {
$this
->drupalGet('admin/help/' . $module);
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContains($name . ' module');
$this
->assertSession()
->linkExists('online documentation for the ' . $name . ' module', 0, "Correct online documentation link is in the help page for {$module}");
}