diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php index 14b1021aaa..bbd0e0ad94 100644 --- a/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php +++ b/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php @@ -4,6 +4,7 @@ use Drupal\Tests\BrowserTestBase; use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait; +use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait; /** * Verifies help topic display and user access to help based on permissions. @@ -13,6 +14,7 @@ class HelpTopicTest extends BrowserTestBase { use AssertPageCacheContextsAndTagsTrait; + use AssertBreadcrumbTrait; /** * Modules to enable. @@ -81,6 +83,7 @@ public function testHelp() { $this->drupalLogin($this->adminUser); $this->verifyHelp(); $this->verifyHelpLinks(); + $this->testBreadCrumb(); // Verify that help topics text appears on admin/help. $this->drupalGet('admin/help'); @@ -181,4 +184,22 @@ protected function getTopicList() { ]; } + /** + * Tests breadcrumb on a help topic page. + */ + public function testBreadCrumb() { + // Prepare common base breadcrumb elements. + $home = ['' => 'Home']; + $admin = $home + ['admin' => t('Administration')]; + + $page = 'admin/help/topic/help_test'; + $this->drupalGet($page); + + // Verify Help Topics administration breadcrumbs. + $trail = $admin + [ + 'admin/help' => t('Help'), + ]; + $this->assertBreadcrumb('admin/help/topic/help_test', $trail); + + } }