public function ToolbarAdminMenuTest::testBackToSiteLink in Drupal 9
Same name and namespace in other branches
- 8 core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php \Drupal\Tests\toolbar\Functional\ToolbarAdminMenuTest::testBackToSiteLink()
Tests that back to site link exists on admin pages, not on content pages.
File
- core/modules/ toolbar/ tests/ src/ Functional/ ToolbarAdminMenuTest.php, line 408 
Class
- ToolbarAdminMenuTest
- Tests the caching of the admin menu subtree items.
Namespace
Drupal\Tests\toolbar\FunctionalCode
public function testBackToSiteLink() {
  // Back to site link should exist in the markup.
  $this
    ->drupalGet('test-page');
  $back_link = $this
    ->cssSelect('.home-toolbar-tab');
  $this
    ->assertNotEmpty($back_link);
}