Drupal 8  8.0.2
LocalTaskManagerTest Class Reference
Inheritance diagram for LocalTaskManagerTest:

Public Member Functions

 testGetLocalTasksForRouteSingleLevelTitle ()
 
 testGetLocalTasksForRouteForChild ()
 
 testGetLocalTaskForRouteWithEmptyCache ()
 
 testGetLocalTaskForRouteWithFilledCache ()
 
 testGetTitle ()
 
 testGetTasksBuildWithCacheabilityMetadata ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setupLocalTaskManager ()
 
 getLocalTaskFixtures ()
 
 setupFactory ($mock_plugin)
 
 getLocalTasksForRouteResult ($mock_plugin)
 
 getLocalTasksCache ()
 
 setupFactoryAndLocalTaskPlugins (array $definitions, $active_plugin_id)
 
 setupNullCacheabilityMetadataValidation ()
 
- 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

 $manager
 
 $controllerResolver
 
 $request
 
 $routeProvider
 
 $pluginDiscovery
 
 $factory
 
 $cacheBackend
 
 $accessManager
 
 $routeMatch
 
 $account
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Menu

Member Function Documentation

getLocalTaskFixtures ( )
protected

Return some local tasks plugin definitions.

Returns
array An array of plugin definition keyed by plugin ID.

Referenced by LocalTaskManagerTest\getLocalTasksCache(), LocalTaskManagerTest\setupFactory(), LocalTaskManagerTest\testGetLocalTaskForRouteWithEmptyCache(), LocalTaskManagerTest\testGetLocalTasksForRouteForChild(), LocalTaskManagerTest\testGetLocalTasksForRouteSingleLevelTitle(), and LocalTaskManagerTest\testGetTasksBuildWithCacheabilityMetadata().

Here is the caller graph for this function:

getLocalTasksCache ( )
protected

Returns the cache entry expected when running getLocalTaskForRoute().

Returns
array

References LocalTaskManagerTest\getLocalTaskFixtures().

Referenced by LocalTaskManagerTest\testGetLocalTaskForRouteWithEmptyCache(), and LocalTaskManagerTest\testGetLocalTaskForRouteWithFilledCache().

Here is the call graph for this function:

Here is the caller graph for this function:

getLocalTasksForRouteResult (   $mock_plugin)
protected

Returns an expected result for getLocalTasksForRoute.

Parameters
\PHPUnit_Framework_MockObject_MockObject$mock_pluginThe mock plugin.
Returns
array The expected result, keyed by local task level.

Referenced by LocalTaskManagerTest\testGetLocalTaskForRouteWithEmptyCache(), LocalTaskManagerTest\testGetLocalTaskForRouteWithFilledCache(), LocalTaskManagerTest\testGetLocalTasksForRouteForChild(), and LocalTaskManagerTest\testGetLocalTasksForRouteSingleLevelTitle().

Here is the caller graph for this function:

setUp ( )
protected

{}

References Drupal\accessManager(), Drupal\request(), Drupal\routeMatch(), and LocalTaskManagerTest\setupLocalTaskManager().

Here is the call graph for this function:

setupFactory (   $mock_plugin)
protected

Setups the plugin factory with some local task plugins.

Parameters
\PHPUnit_Framework_MockObject_MockObject$mock_pluginThe mock plugin.

References LocalTaskManagerTest\getLocalTaskFixtures().

Referenced by LocalTaskManagerTest\testGetLocalTaskForRouteWithEmptyCache(), LocalTaskManagerTest\testGetLocalTaskForRouteWithFilledCache(), LocalTaskManagerTest\testGetLocalTasksForRouteForChild(), and LocalTaskManagerTest\testGetLocalTasksForRouteSingleLevelTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

setupLocalTaskManager ( )
protected

Setups the local task manager for the test.

References Drupal\accessManager(), Drupal\request(), and Drupal\routeMatch().

Referenced by LocalTaskManagerTest\setUp(), LocalTaskManagerTest\testGetLocalTaskForRouteWithEmptyCache(), LocalTaskManagerTest\testGetLocalTaskForRouteWithFilledCache(), LocalTaskManagerTest\testGetLocalTasksForRouteForChild(), LocalTaskManagerTest\testGetLocalTasksForRouteSingleLevelTitle(), and LocalTaskManagerTest\testGetTasksBuildWithCacheabilityMetadata().

Here is the call graph for this function:

Here is the caller graph for this function:

testGetLocalTaskForRouteWithEmptyCache ( )

Tests the cache of the local task manager with an empty initial cache.

References LocalTaskManagerTest\getLocalTaskFixtures(), LocalTaskManagerTest\getLocalTasksCache(), LocalTaskManagerTest\getLocalTasksForRouteResult(), Cache\PERMANENT, LocalTaskManagerTest\setupFactory(), and LocalTaskManagerTest\setupLocalTaskManager().

Here is the call graph for this function:

testGetLocalTaskForRouteWithFilledCache ( )

Tests the cache of the local task manager with a filled initial cache.

References LocalTaskManagerTest\getLocalTasksCache(), LocalTaskManagerTest\getLocalTasksForRouteResult(), LocalTaskManagerTest\setupFactory(), and LocalTaskManagerTest\setupLocalTaskManager().

Here is the call graph for this function:

testGetLocalTasksForRouteForChild ( )

Tests the getLocalTasksForRoute method on a child.

See Also
::getLocalTasksForRoute()

References LocalTaskManagerTest\getLocalTaskFixtures(), LocalTaskManagerTest\getLocalTasksForRouteResult(), LocalTaskManagerTest\setupFactory(), and LocalTaskManagerTest\setupLocalTaskManager().

Here is the call graph for this function:

testGetLocalTasksForRouteSingleLevelTitle ( )

Tests the getLocalTasksForRoute method.

See Also
::getLocalTasksForRoute()

References LocalTaskManagerTest\getLocalTaskFixtures(), LocalTaskManagerTest\getLocalTasksForRouteResult(), LocalTaskManagerTest\setupFactory(), and LocalTaskManagerTest\setupLocalTaskManager().

Here is the call graph for this function:

testGetTasksBuildWithCacheabilityMetadata ( )

::getTasksBuild

References AccessResult\allowed(), LocalTaskManagerTest\getLocalTaskFixtures(), Drupal\routeMatch(), and LocalTaskManagerTest\setupLocalTaskManager().

Here is the call graph for this function:

testGetTitle ( )

Tests the getTitle method.

See Also
::getTitle()

References Drupal\request().

Here is the call graph for this function:


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