You are here

public function ErrorHandlerTest::testConstruct in Zircon Profile 8

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

File

vendor/symfony/debug/Tests/ErrorHandlerTest.php, line 114

Class

ErrorHandlerTest
ErrorHandlerTest.

Namespace

Symfony\Component\Debug\Tests

Code

public function testConstruct() {
  try {
    $handler = ErrorHandler::register();
    $handler
      ->throwAt(3, true);
    $this
      ->assertEquals(3 | E_RECOVERABLE_ERROR | E_USER_ERROR, $handler
      ->throwAt(0));
    restore_error_handler();
    restore_exception_handler();
  } catch (\Exception $e) {
    restore_error_handler();
    restore_exception_handler();
    throw $e;
  }
}