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:
@@ -182,7 +182,12 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
|
|||||||
$formatter = new NormalizerFormatter();
|
$formatter = new NormalizerFormatter();
|
||||||
$reflMethod = new \ReflectionMethod($formatter, 'toJson');
|
$reflMethod = new \ReflectionMethod($formatter, 'toJson');
|
||||||
$reflMethod->setAccessible(true);
|
$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()
|
public function testExceptionTraceWithArgs()
|
||||||
|
Reference in New Issue
Block a user