[Debug] fixed case differences between PHP and HHVM (classes are case-insensitive anyway in PHP)

This commit is contained in:
Fabien Potencier 2014-02-03 11:14:27 +01:00
parent 23acc24015
commit e22339596d
2 changed files with 4 additions and 2 deletions

View File

@ -254,7 +254,8 @@ PHP
$m->invoke($handler, $exceptionHandler, $error);
$this->assertInstanceof($class, $exceptionHandler->e);
$this->assertSame($translatedMessage, $exceptionHandler->e->getMessage());
// 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());

View File

@ -25,7 +25,8 @@ class UndefinedFunctionFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase
$exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line']));
$this->assertInstanceof('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception);
$this->assertSame($translatedMessage, $exception->getMessage());
// class names are case insensitive and PHP/HHVM do not return the same
$this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage()));
$this->assertSame($error['type'], $exception->getSeverity());
$this->assertSame($error['file'], $exception->getFile());
$this->assertSame($error['line'], $exception->getLine());