You are here

public function ExceptionHandlerTest::testDebug in Zircon Profile 8.0

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

File

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

Class

ExceptionHandlerTest

Namespace

Symfony\Component\Debug\Tests

Code

public function testDebug() {
  $handler = new ExceptionHandler(false);
  ob_start();
  $handler
    ->sendPhpResponse(new \RuntimeException('Foo'));
  $response = ob_get_clean();
  $this
    ->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response);
  $this
    ->assertNotContains('<h2 class="block_exception clear_fix">', $response);
  $handler = new ExceptionHandler(true);
  ob_start();
  $handler
    ->sendPhpResponse(new \RuntimeException('Foo'));
  $response = ob_get_clean();
  $this
    ->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response);
  $this
    ->assertContains('<h2 class="block_exception clear_fix">', $response);
}