1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 23:54:04 +02:00

Adjust check for php5.3/5.4

This commit is contained in:
Jordi Boggiano
2015-07-12 14:01:43 +01:00
parent 0c8a92af47
commit 558678b420

View File

@@ -182,7 +182,12 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
$formatter = new NormalizerFormatter();
$reflMethod = new \ReflectionMethod($formatter, 'toJson');
$reflMethod->setAccessible(true);
$res = $reflMethod->invoke($formatter, array('message' => utf8_decode('öü')));
// send an invalid unicode sequence
$res = $reflMethod->invoke($formatter, array('message' => "\xB1\x31"));
if (PHP_VERSION_ID < 50500 && $res === array('message' => null)) {
throw new \RuntimeException('PHP 5.3/5.4 throw a warning and null the value instead of returning false entirely');
}
}
public function testExceptionTraceWithArgs()