Drupal 8  8.0.2
MenuActiveTrailTest Class Reference
Inheritance diagram for MenuActiveTrailTest:

Public Member Functions

 provider ()
 
 testGetActiveLink (Request $request, $links, $menu_name, $expected_link)
 
 testGetActiveTrailIds (Request $request, $links, $menu_name, $expected_link, $expected_trail)
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $menuActiveTrail
 
 $requestStack
 
 $currentRouteMatch
 
 $menuLinkManager
 
 $cache
 
 $lock
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Tests the active menu trail service.

Menu

Member Function Documentation

provider ( )

Provides test data for all test methods.

Returns
array Returns a list of test data of which each is an array containing the following elements:
  • request: A request object.
  • links: An array of menu links keyed by ID.
  • menu_name: The active menu name.
  • expected_link: The expected active link for the given menu.

References MenuLinkMock\create(), and UnitTestCase\randomMachineName().

Here is the call graph for this function:

setUp ( )
protected

{}

References Drupal\cache(), Drupal\lock(), Drupal\requestStack(), and Drupal\setContainer().

Here is the call graph for this function:

testGetActiveLink ( Request  $request,
  $links,
  $menu_name,
  $expected_link 
)

Tests getActiveLink().

::getActiveLink provider

References Drupal\requestStack().

Here is the call graph for this function:

testGetActiveTrailIds ( Request  $request,
  $links,
  $menu_name,
  $expected_link,
  $expected_trail 
)

Tests getActiveTrailIds().

::getActiveTrailIds provider

References Drupal\requestStack().

Here is the call graph for this function:


The documentation for this class was generated from the following file: