Example #1
0
 /**
  * Tests the showExceptionPage method.
  */
 public function testShowExceptionPage()
 {
     // Set the mock exception handler.
     $mockExceptionHandler = new MockExceptionHandler();
     $this->application->setExceptionHandler($mockExceptionHandler);
     // Setup the exception to page it.
     $exception = new \Exception('This is an exception message!', 123);
     $internal = false;
     // Now show the exception page.
     $this->application->showExceptionPage($exception, $internal);
     // Make sure it was called.
     $this->assertEquals($exception, $mockExceptionHandler->getException());
     $this->assertEquals($internal, $mockExceptionHandler->getInternal());
 }