[Debug] Restoring error handler before assertions

This commit is contained in:
Endre Fejes 2014-09-19 22:54:50 +02:00
parent 29ccb30825
commit 51fa3efc0f

View File

@ -206,13 +206,13 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
$m->setAccessible(true); $m->setAccessible(true);
$m->invoke($handler, array($exceptionHandler, 'handle'), $error); $m->invoke($handler, array($exceptionHandler, 'handle'), $error);
restore_error_handler();
$this->assertInstanceof($class, $exceptionHandler->e); $this->assertInstanceof($class, $exceptionHandler->e);
// class names are case insensitive and PHP/HHVM do not return the same // class names are case insensitive and PHP/HHVM do not return the same
$this->assertSame(strtolower($translatedMessage), strtolower($exceptionHandler->e->getMessage())); $this->assertSame(strtolower($translatedMessage), strtolower($exceptionHandler->e->getMessage()));
$this->assertSame($error['type'], $exceptionHandler->e->getSeverity()); $this->assertSame($error['type'], $exceptionHandler->e->getSeverity());
$this->assertSame($error['file'], $exceptionHandler->e->getFile()); $this->assertSame($error['file'], $exceptionHandler->e->getFile());
$this->assertSame($error['line'], $exceptionHandler->e->getLine()); $this->assertSame($error['line'], $exceptionHandler->e->getLine());
restore_error_handler();
} }
public function provideFatalErrorHandlersData() public function provideFatalErrorHandlersData()