public function it_allows_when_authorization_service_grants_access()
{
$authorizationService = $this->prophesize(AuthorizationService::class);
$authorizationService->isGranted('test_event', new \stdClass())->willReturn(true);
$actionEvent = $this->prophesize(ActionEvent::class);
$actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_NAME)->willReturn('test_event');
$actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE)->willReturn(new \stdClass());
$routeGuard = new RouteGuard($authorizationService->reveal());
$this->assertNull($routeGuard->onRoute($actionEvent->reveal()));
}