diff --git a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php b/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php index 5d9f692..aa54731 100644 --- a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php +++ b/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php @@ -31,7 +31,6 @@ public static function getInfo() { * @see \Drupal\block\BlockFormController::getUniqueMachineName() */ public function testGetUniqueMachineName() { - $block_storage = $this->getMock('Drupal\Core\Config\Entity\ConfigStorageControllerInterface'); $blocks = array(); $blocks['test'] = $this->getBlockMockWithMachineName('test'); @@ -39,9 +38,7 @@ public function testGetUniqueMachineName() { $blocks['other_test_1'] = $this->getBlockMockWithMachineName('other_test'); $blocks['other_test_2'] = $this->getBlockMockWithMachineName('other_test'); - $query = $this->getMockBuilder('Drupal\Core\Entity\Query\QueryInterface') - ->disableOriginalConstructor() - ->getMock(); + $query = $this->getMock('Drupal\Core\Entity\Query\QueryInterface'); $query->expects($this->exactly(5)) ->method('condition') ->will($this->returnValue($query)); @@ -50,12 +47,9 @@ public function testGetUniqueMachineName() { ->method('execute') ->will($this->returnValue(array('test', 'other_test', 'other_test_1', 'other_test_2'))); - $query_factory = $this->getMockBuilder('Drupal\Core\Entity\Query\QueryFactory') - ->disableOriginalConstructor() - ->getMock(); - $query_factory->expects($this->exactly(5)) - ->method('get') - ->with('block', 'AND') + $block_storage = $this->getMock('Drupal\Core\Config\Entity\ConfigStorageControllerInterface'); + $block_storage->expects($this->exactly(5)) + ->method('getQuery') ->will($this->returnValue($query)); $entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface'); @@ -68,7 +62,7 @@ public function testGetUniqueMachineName() { $config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); - $block_form_controller = new BlockFormController($entity_manager, $query_factory, $language_manager, $config_factory); + $block_form_controller = new BlockFormController($entity_manager, $language_manager, $config_factory); // Ensure that the block with just one other instance gets the next available // name suggestion. diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php index c2c86fc..2bb7236 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php @@ -59,8 +59,8 @@ public function __construct(EntityStorageControllerInterface $menu_storage, Menu public static function create(ContainerInterface $container) { $entity_manager = $container->get('entity.manager'); return new static( - $$entity_manager->getStorageController('menu'), - $$entity_manager->getStorageController('menu_link') + $entity_manager->getStorageController('menu'), + $entity_manager->getStorageController('menu_link') ); }