diff --git a/core/phpunit.xml.dist b/core/phpunit.xml.dist index aa4acfd..bf175e2 100644 --- a/core/phpunit.xml.dist +++ b/core/phpunit.xml.dist @@ -1,6 +1,6 @@ - + diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/AccessSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/AccessSubscriberTest.php index 746b5c8..45b86f8 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/AccessSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/AccessSubscriberTest.php @@ -151,23 +151,23 @@ public function testAccessSubscriberOnlyChecksForRequestsWithRouteObject() { * Tests that if access is granted, AccessSubscriber will not throw a Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException exception. */ public function testAccessSubscriberDoesNotAlterRequestIfAccessManagerGrantsAccess() { - $this->parameterBag->expects($this->any()) + $this->parameterBag->expects($this->once()) ->method('has') ->with(RouteObjectInterface::ROUTE_OBJECT) ->will($this->returnValue(TRUE)); - $this->parameterBag->expects($this->any()) + $this->parameterBag->expects($this->once()) ->method('get') ->with(RouteObjectInterface::ROUTE_OBJECT) ->will($this->returnValue($this->route)); - $this->accessManager->expects($this->any()) + $this->accessManager->expects($this->once()) ->method('check') - ->with($this->anything()) + ->with($this->equalTo($this->route)) ->will($this->returnValue(TRUE)); $subscriber = new AccessSubscriber($this->accessManager, $this->currentUser); - // The onKernelRequestAccessCheck() method has no return value. + // We're testing that no exception is thrown in this case. There is no return. $subscriber->onKernelRequestAccessCheck($this->event); }