You are here

public function ExceptionHandlerTest::testHandle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/debug/Tests/ExceptionHandlerTest.php \Symfony\Component\Debug\Tests\ExceptionHandlerTest::testHandle()

File

vendor/symfony/debug/Tests/ExceptionHandlerTest.php, line 99

Class

ExceptionHandlerTest

Namespace

Symfony\Component\Debug\Tests

Code

public function testHandle() {
  $exception = new \Exception('foo');
  $handler = $this
    ->getMock('Symfony\\Component\\Debug\\ExceptionHandler', array(
    'sendPhpResponse',
  ));
  $handler
    ->expects($this
    ->exactly(2))
    ->method('sendPhpResponse');
  $handler
    ->handle($exception);
  $that = $this;
  $handler
    ->setHandler(function ($e) use ($exception, $that) {
    $that
      ->assertSame($exception, $e);
  });
  $handler
    ->handle($exception);
}