diff --git a/tests/Monolog/Formatter/NormalizerFormatterTest.php b/tests/Monolog/Formatter/NormalizerFormatterTest.php index 83c45ca6..095fb08e 100644 --- a/tests/Monolog/Formatter/NormalizerFormatterTest.php +++ b/tests/Monolog/Formatter/NormalizerFormatterTest.php @@ -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()