ProophTest\ServiceBus\Plugin\Guard\RouteGuardTest::it_allows_when_authorization_service_grants_access PHP Method

it_allows_when_authorization_service_grants_access() public method

    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()));
    }