Navigation Menu

Skip to content

Commit

Permalink
[Debug] Restoring error handler before assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
fejese committed Sep 19, 2014
1 parent 29ccb30 commit 51fa3ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
Expand Up @@ -206,13 +206,13 @@ public function testFatalErrorHandlers($error, $class, $translatedMessage)
$m->setAccessible(true);
$m->invoke($handler, array($exceptionHandler, 'handle'), $error);

restore_error_handler();
$this->assertInstanceof($class, $exceptionHandler->e);
// class names are case insensitive and PHP/HHVM do not return the same
$this->assertSame(strtolower($translatedMessage), strtolower($exceptionHandler->e->getMessage()));
$this->assertSame($error['type'], $exceptionHandler->e->getSeverity());
$this->assertSame($error['file'], $exceptionHandler->e->getFile());
$this->assertSame($error['line'], $exceptionHandler->e->getLine());
restore_error_handler();
}

public function provideFatalErrorHandlersData()
Expand Down

0 comments on commit 51fa3ef

Please sign in to comment.