You are here

public function MenuTrailByPathActiveTrailHtmlClassTest::testUrlNewsNewsOverview in Menu Trail By Path 8

Test url: News » News overview

File

tests/src/Functional/MenuTrailByPathActiveTrailHtmlClassTest.php, line 190

Class

MenuTrailByPathActiveTrailHtmlClassTest
Tests that the menu links have the correct css-classes.

Namespace

Drupal\Tests\menu_trail_by_path\Functional

Code

public function testUrlNewsNewsOverview() {
  $this
    ->drupalGet(clone $this->menuUrls['News » News overview']);
  $this
    ->assertMenuActiveTrail([
    $this
      ->menuUrlBasePath('News » News overview') => 'News overview',
  ], TRUE);

  // Also test the parent item, due to the tree url key construction of assertMenuActiveTrail we need two separate calls
  $this
    ->assertMenuActiveTrail([
    $this
      ->menuUrlBasePath('News') => 'News',
  ], TRUE);
}