trait AssertMenuActiveTrailTrait (View source)

deprecated in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\system\Functional\Menu\AssertMenuActiveTrailTrait instead.

Provides test assertions for verifying the active menu trail.

Methods

assertMenuActiveTrail(array $tree, bool $last_active)

Assert that active trail exists in a menu tree output.

Details

protected assertMenuActiveTrail(array $tree, bool $last_active)

Assert that active trail exists in a menu tree output.

Parameters

array $tree

An associative array whose keys are link paths and whose values are link titles (not sanitized) of an expected active trail in a menu tree output on the page.

bool $last_active

Whether the last link in $tree is expected to be active (TRUE) or just to be in the active trail (FALSE).