public function testGetExceptionByCode() { $this->assertFalse($this->_response->getExceptionByCode(200)); $this->_response->setException(new Zend_Controller_Response_Exception('FooBar', 200)); $exceptions = $this->_response->getExceptionByCode(200); $this->assertTrue(0 < count($exceptions)); $this->assertEquals(200, $exceptions[0]->getCode()); }
public function testSendResponseWithExceptions() { $e = new Exception('Test exception rendering'); $this->_response->setException($e); $this->_response->renderExceptions(true); ob_start(); $this->_response->sendResponse(); $string = ob_get_clean(); $this->assertContains('Test exception rendering', $string); }