/** * @dataProvider providerRunEventWithInvalidEventThrowsException * @expectedException zibo\ZiboException */ public function testRunEventWithInvalidEventThrowsException($event) { $this->eventManager->triggerEvent($event); }
/** * Sends the response to the client * @return null */ protected function sendResponse() { $this->eventManager->triggerEvent(self::EVENT_PRE_RESPONSE, $this); $statusCode = $this->response->getStatusCode(); $headers = $this->response->getHeaders(); $this->sendHeaders($statusCode, $headers); if (!$this->response->willRedirect()) { $view = $this->response->getView(); if ($view) { $view->render(false); } } $this->eventManager->triggerEvent(self::EVENT_POST_RESPONSE, $this); }