function HelpTopicTest::verifyBreadCrumb
Same name in other branches
- 9 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::verifyBreadCrumb()
- 8.9.x core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::verifyBreadCrumb()
- 11.x core/modules/help/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help\Functional\HelpTopicTest::verifyBreadCrumb()
Tests breadcrumb on a help topic page.
1 call to HelpTopicTest::verifyBreadCrumb()
- HelpTopicTest::testHelp in core/
modules/ help/ tests/ src/ Functional/ HelpTopicTest.php - Tests the main help page and individual pages for topics.
File
-
core/
modules/ help/ tests/ src/ Functional/ HelpTopicTest.php, line 275
Class
- HelpTopicTest
- Verifies help topic display and user access to help based on permissions.
Namespace
Drupal\Tests\help\FunctionalCode
public function verifyBreadCrumb() {
// Verify Help Topics administration breadcrumbs.
$trail = [
'' => 'Home',
'admin' => 'Administration',
'admin/help' => 'Help',
];
$this->assertBreadcrumb('admin/help/topic/help_topics_test.test', $trail);
// Ensure we are on the expected help topic page.
$this->assertSession()
->pageTextContains('Also there should be a related topic link below to the Help module topic page and the linked topic.');
// Verify that another page does not have the help breadcrumb.
$trail = [
'' => 'Home',
'admin' => 'Administration',
'admin/config' => 'Configuration',
'admin/config/system' => 'System',
];
$this->assertBreadcrumb('admin/config/system/site-information', $trail);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.