1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-03 11:47:38 +02:00

Fix tests

This commit is contained in:
Jordi Boggiano
2013-03-18 19:06:02 +01:00
parent 8fcb833b5c
commit dd0b216e02

View File

@@ -102,13 +102,9 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
'message' => 'foobar', 'message' => 'foobar',
)); ));
if (version_compare(PHP_VERSION, '5.4.0', '>=')) { $path = str_replace('\\/', '/', json_encode(__FILE__));
$path = json_encode(__FILE__, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
} else {
$path = 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() public function testBatchFormat()