public function test_getters_and_setters() { $request = new HttpRequest(); $response = new HttpResponse(); $event = new HandleHttpRequestEvent($request); $this->assertTrue($event->getRequest() === $request); $this->assertNull($event->getResponse()); $event->setResponse($response); $this->assertTrue($response === $event->getResponse()); }
/** * Handle HandleHttpRequestEvent and create a response. * * @param HandleHttpRequestEvent $event */ public function handleHandleHttpRequestEvent(HandleHttpRequestEvent $event) { $event->setResponse($this->requestHandler->handle($event->getRequest())); }