diff --git a/core/modules/system/tests/Drupal/system/Tests/Plugin/Type/MenuLocalTaskManagerTest.php b/core/modules/system/tests/Drupal/system/Tests/Plugin/Type/MenuLocalTaskManagerTest.php index 6fe9e1d..1827d5b 100644 --- a/core/modules/system/tests/Drupal/system/Tests/Plugin/Type/MenuLocalTaskManagerTest.php +++ b/core/modules/system/tests/Drupal/system/Tests/Plugin/Type/MenuLocalTaskManagerTest.php @@ -62,13 +62,6 @@ class MenuLocalTaskManagerTest extends UnitTestCase { */ protected $factory; - /** - * The mocked local task plugin base class. - * - * @var \PHPUnit_Framework_MockObject_MockObject - */ - protected $basePlugin; - public static function getInfo() { return array( 'name' => 'Local tasks manager.', @@ -89,11 +82,6 @@ protected function setUp() { $this->pluginDiscovery = $this->getMock('Drupal\Component\Plugin\Discovery\DiscoveryInterface'); $this->factory = $this->getMock('Drupal\Component\Plugin\Factory\FactoryInterface'); - $this->basePlugin = $this - ->getMockBuilder('Drupal\system\Plugin\MenuLocalTaskBase') - ->disableOriginalConstructor() - ->getMock(); - $this->setupLocalTaskManager(); } @@ -158,15 +146,16 @@ public function testGetLocalTasksForRouteSingleLevelTitle() { * @see \Drupal\system\Plugin\Type\MenuLocalTaskManager::getTitle() */ public function testGetTitle() { - $this->basePlugin->expects($this->once()) + $menu_local_task = $this->getMock('Drupal\system\Plugin\MenuLocalTaskInterface'); + $menu_local_task->expects($this->once()) ->method('getTitle'); $this->controllerResolver->expects($this->once()) ->method('getArguments') - ->with($this->request, array($this->basePlugin, 'getTitle')) + ->with($this->request, array($menu_local_task, 'getTitle')) ->will($this->returnValue(array())); - $this->manager->getTitle($this->basePlugin); + $this->manager->getTitle($menu_local_task); } /** @@ -175,15 +164,16 @@ public function testGetTitle() { * @see \Drupal\system\Plugin\Type\MenuLocalTaskManager::getPath() */ public function testGetPath() { - $this->basePlugin->expects($this->once()) + $menu_local_task = $this->getMock('Drupal\system\Plugin\MenuLocalTaskInterface'); + $menu_local_task->expects($this->once()) ->method('getPath'); $this->controllerResolver->expects($this->once()) ->method('getArguments') - ->with($this->request, array($this->basePlugin, 'getPath')) + ->with($this->request, array($menu_local_task, 'getPath')) ->will($this->returnValue(array())); - $this->manager->getPath($this->basePlugin); + $this->manager->getPath($menu_local_task); } /**