You are here

protected function LocalTaskManagerTest::getLocalTasksForRouteResult in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::getLocalTasksForRouteResult()

Returns an expected result for getLocalTasksForRoute.

Parameters

\PHPUnit_Framework_MockObject_MockObject $mock_plugin: The mock plugin.

Return value

array The expected result, keyed by local task level.

4 calls to LocalTaskManagerTest::getLocalTasksForRouteResult()
LocalTaskManagerTest::testGetLocalTaskForRouteWithEmptyCache in core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
Tests the cache of the local task manager with an empty initial cache.
LocalTaskManagerTest::testGetLocalTaskForRouteWithFilledCache in core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
Tests the cache of the local task manager with a filled initial cache.
LocalTaskManagerTest::testGetLocalTasksForRouteForChild in core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
Tests the getLocalTasksForRoute method on a child.
LocalTaskManagerTest::testGetLocalTasksForRouteSingleLevelTitle in core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php
Tests the getLocalTasksForRoute method.

File

core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php, line 361
Contains \Drupal\Tests\Core\Menu\LocalTaskManagerTest.

Class

LocalTaskManagerTest
@coversDefaultClass \Drupal\Core\Menu\LocalTaskManager @group Menu

Namespace

Drupal\Tests\Core\Menu

Code

protected function getLocalTasksForRouteResult($mock_plugin) {
  $result = array(
    0 => array(
      'menu_local_task_test_tasks_settings' => $mock_plugin,
      'menu_local_task_test_tasks_view.tab' => $mock_plugin,
      'menu_local_task_test_tasks_edit' => $mock_plugin,
    ),
    1 => array(
      'menu_local_task_test_tasks_view_child1' => $mock_plugin,
      'menu_local_task_test_tasks_view_child2' => $mock_plugin,
    ),
  );
  return $result;
}