ProophTest\ServiceBus\Plugin\Guard\FinalizeGuardTest::it_attaches_to_action_event_emitter PHP Method

it_attaches_to_action_event_emitter() public method

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