protected function InstallUninstallTest::assertHelp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Module/InstallUninstallTest.php \Drupal\system\Tests\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/ src/ Tests/ Module/ InstallUninstallTest.php - Tests that a fixed set of modules can be installed and uninstalled.
File
- core/
modules/ system/ src/ Tests/ Module/ InstallUninstallTest.php, line 306 - Contains \Drupal\system\Tests\Module\InstallUninstallTest.
Class
- InstallUninstallTest
- Install/uninstall core module and confirm table creation/deletion.
Namespace
Drupal\system\Tests\ModuleCode
protected function assertHelp($module, $name) {
$this
->drupalGet('admin/help/' . $module);
$this
->assertResponse(200, "Help for {$module} displayed successfully");
$this
->assertText($name . ' module', "'{$name} module' is on the help page for {$module}");
$this
->assertLink('online documentation for the ' . $name . ' module', 0, "Correct online documentation link is in the help page for {$module}");
}