protected function LocalTaskManagerTest::setupFactory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php \Drupal\Tests\Core\Menu\LocalTaskManagerTest::setupFactory()
Setups the plugin factory with some local task plugins.
Parameters
\PHPUnit_Framework_MockObject_MockObject $mock_plugin: The mock plugin.
4 calls to LocalTaskManagerTest::setupFactory()
- 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 342 - Contains \Drupal\Tests\Core\Menu\LocalTaskManagerTest.
Class
- LocalTaskManagerTest
- @coversDefaultClass \Drupal\Core\Menu\LocalTaskManager @group Menu
Namespace
Drupal\Tests\Core\MenuCode
protected function setupFactory($mock_plugin) {
$map = array();
foreach ($this
->getLocalTaskFixtures() as $info) {
$map[] = array(
$info['id'],
array(),
$mock_plugin,
);
}
$this->factory
->expects($this
->any())
->method('createInstance')
->will($this
->returnValueMap($map));
}