From dd0b216e0229a24178c2f0782f8a7172c7ed1c96 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 18 Mar 2013 19:06:02 +0100 Subject: [PATCH] Fix tests --- tests/Monolog/Formatter/LineFormatterTest.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/Monolog/Formatter/LineFormatterTest.php b/tests/Monolog/Formatter/LineFormatterTest.php index 22f8472a..17ce8512 100644 --- a/tests/Monolog/Formatter/LineFormatterTest.php +++ b/tests/Monolog/Formatter/LineFormatterTest.php @@ -102,13 +102,9 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase 'message' => 'foobar', )); - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - $path = json_encode(__FILE__, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - } else { - $path = json_encode(__FILE__); - } + $path = str_replace('\\/', '/', json_encode(__FILE__)); - $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException: Foo at '.substr($path, 1, -1).':'.(__LINE__-12).')"} []'."\n", $message); + $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException: Foo at '.substr($path, 1, -1).':'.(__LINE__-8).')"} []'."\n", $message); } public function testBatchFormat()