Beispiel #1
0
 /**
  * Test that with throwExceptions() set, an exception is thrown
  */
 public function testThrowExceptionsThrows()
 {
     $this->_controller->throwExceptions(true);
     $this->_controller->setControllerDirectory(__DIR__);
     $request = new Request\Http('http://framework.zend.com/bogus/baz');
     $this->_controller->setResponse(new Response\Cli());
     $this->_controller->setRouter(new Router\Rewrite());
     try {
         $response = $this->_controller->dispatch($request);
         $this->fail('Invalid controller should throw exception');
     } catch (\Exception $e) {
         // success
     }
 }