ProophTest\ServiceBus\Plugin\Guard\RouteGuardTest::it_attaches_to_action_event_emitter PHP Метод

it_attaches_to_action_event_emitter() публичный Метод

    public function it_attaches_to_action_event_emitter()
    {
        $listenerHandler = $this->prophesize(ListenerHandler::class);
        $authorizationService = $this->prophesize(AuthorizationService::class);
        $routeGuard = new RouteGuard($authorizationService->reveal());
        $actionEventEmitter = $this->prophesize(ActionEventEmitter::class);
        $actionEventEmitter->attachListener(MessageBus::EVENT_ROUTE, [$routeGuard, 'onRoute'], 1000)->willReturn($listenerHandler->reveal());
        $routeGuard->attach($actionEventEmitter->reveal());
    }