diff --git a/core/tests/Drupal/Tests/Core/DrupalTest.php b/core/tests/Drupal/Tests/Core/DrupalTest.php index 450e2fb..7fb3719 100644 --- a/core/tests/Drupal/Tests/Core/DrupalTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalTest.php @@ -104,7 +104,7 @@ public function testKeyValueExpirable() { ->getMock(); $keyvalue->expects($this->once()) ->method('get') - ->with($this->equalTo('test_collection')); + ->with('test_collection'); $this->setMockContainerService('keyvalue.expirable', $keyvalue); \Drupal::keyValueExpirable('test_collection'); } @@ -126,7 +126,7 @@ public function testConfig() { ->getMock(); $config->expects($this->once()) ->method('get') - ->with($this->equalTo('test_config')); + ->with('test_config'); $this->setMockContainerService('config.factory', $config); \Drupal::config('test_config'); } @@ -140,7 +140,7 @@ public function testQueue() { ->getMock(); $queue->expects($this->once()) ->method('get') - ->with($this->equalTo('test_queue'), $this->equalTo(TRUE)); + ->with('test_queue', TRUE); $this->setMockContainerService('queue', $queue); \Drupal::queue('test_queue', TRUE); } @@ -154,7 +154,7 @@ public function testKeyValue() { ->getMock(); $keyvalue->expects($this->once()) ->method('get') - ->with($this->equalTo('test_collection')); + ->with('test_collection'); $this->setMockContainerService('keyvalue', $keyvalue); \Drupal::keyValue('test_collection'); } @@ -184,7 +184,7 @@ public function testEntityQuery() { ->getMock(); $query->expects($this->once()) ->method('get') - ->with($this->equalTo('test_entity'), $this->equalTo('OR')); + ->with('test_entity', 'OR'); $this->setMockContainerService('entity.query', $query); \Drupal::entityQuery('test_entity', 'OR'); } @@ -198,7 +198,7 @@ public function testEntityQueryAggregate() { ->getMock(); $query->expects($this->once()) ->method('getAggregate') - ->with($this->equalTo('test_entity'), $this->equalTo('OR')); + ->with('test_entity', 'OR'); $this->setMockContainerService('entity.query', $query); \Drupal::entityQueryAggregate('test_entity', 'OR'); } @@ -247,15 +247,16 @@ public function testUrlGenerator() { * Tests the url() method. */ public function testUrl() { - $test_array = array('test' => 'test'); + $route_parameters = array('test_parameter' => 'test'); + $options = array('test_option' => 'test'); $generator = $this->getMockBuilder('Drupal\Core\Routing\UrlGenerator') ->disableOriginalConstructor() ->getMock(); $generator->expects($this->once()) ->method('generateFromRoute') - ->with($this->equalTo('test_route'), $this->equalTo($test_array), $this->equalTo($test_array)); + ->with('test_route', $route_parameters, $options); $this->setMockContainerService('url_generator', $generator); - \Drupal::url('test_route', $test_array, $test_array); + \Drupal::url('test_route', $route_parameters, $options); } /** @@ -270,15 +271,16 @@ public function testLinkGenerator() { * Tests the l() method. */ public function testL() { - $test_array = array('test' => 'test'); + $route_parameters = array('test_parameter' => 'test'); + $options = array('test_option' => 'test'); $generator = $this->getMockBuilder('Drupal\Core\Utility\LinkGenerator') ->disableOriginalConstructor() ->getMock(); $generator->expects($this->once()) ->method('generate') - ->with($this->equalTo('Test title'), $this->equalTo('test_route'), $this->equalTo($test_array), $this->equalTo($test_array)); + ->with('Test title', 'test_route', $route_parameters, $options); $this->setMockContainerService('link_generator', $generator); - \Drupal::l('Test title', 'test_route', $test_array, $test_array); + \Drupal::l('Test title', 'test_route', $route_parameters, $options); } /** @@ -324,7 +326,7 @@ public function testTransliteration() { protected function setMockContainerService($service_name, $return = NULL) { $expects = $this->container->expects($this->once()) ->method('get') - ->with($this->equalTo($service_name)); + ->with($service_name); if (isset($return)) { $expects->will($this->returnValue($return));