Skip to content

Commit e223395

Browse files
committed
[Debug] fixed case differences between PHP and HHVM (classes are case-insensitive anyway in PHP)
1 parent 23acc24 commit e223395

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ public function testFatalErrorHandlers($error, $class, $translatedMessage)
254254
$m->invoke($handler, $exceptionHandler, $error);
255255

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

src/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public function testUndefinedFunction($error, $translatedMessage)
2525
$exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line']));
2626

2727
$this->assertInstanceof('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception);
28-
$this->assertSame($translatedMessage, $exception->getMessage());
28+
// class names are case insensitive and PHP/HHVM do not return the same
29+
$this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage()));
2930
$this->assertSame($error['type'], $exception->getSeverity());
3031
$this->assertSame($error['file'], $exception->getFile());
3132
$this->assertSame($error['line'], $exception->getLine());

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy