/** * @covers \Splot\Framework\Events\ExceptionDidOccur::__construct * @covers \Splot\Framework\Events\ExceptionDidOccur::getException * @covers \Splot\Framework\Events\ExceptionDidOccur::isHandled * @covers \Splot\Framework\Events\ExceptionDidOccur::getResponse * @covers \Splot\Framework\Events\ExceptionDidOccur::getHandled * @covers \Splot\Framework\Events\ExceptionDidOccur::setResponse */ public function testExceptionDidOccur() { $exception = new \Exception('Some exception', 500); $event = new Events\ExceptionDidOccur($exception); $this->assertSame($exception, $event->getException()); $this->assertFalse($event->isHandled()); $response = new Response('some response'); $event->setResponse($response); $this->assertSame($response, $event->getResponse()); $this->assertTrue($event->isHandled()); $this->assertTrue($event->getHandled()); }