mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-24 15:02:28 +01:00
Fix tests
This commit is contained in:
parent
5feb21ae1a
commit
8fcb833b5c
@ -102,7 +102,13 @@ class LineFormatterTest extends \PHPUnit_Framework_TestCase
|
|||||||
'message' => 'foobar',
|
'message' => 'foobar',
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException: Foo at '.substr(json_encode(__FILE__), 1, -1).':'.(__LINE__-6).')"} []'."\n", $message);
|
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||||
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testBatchFormat()
|
public function testBatchFormat()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user