You are here

public function HelpTopicTest::verifyBreadCrumb in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::verifyBreadCrumb()
  2. 10 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::verifyBreadCrumb()

Tests breadcrumb on a help topic page.

1 call to HelpTopicTest::verifyBreadCrumb()
HelpTopicTest::testHelp in core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
Tests the main help page and individual pages for topics.

File

core/modules/help_topics/tests/src/Functional/HelpTopicTest.php, line 232

Class

HelpTopicTest
Verifies help topic display and user access to help based on permissions.

Namespace

Drupal\Tests\help_topics\Functional

Code

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);
}