1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Update test for 5.4/5.3

This commit is contained in:
Jordi Boggiano
2015-06-01 22:33:28 +01:00
parent b1afe75df9
commit 131b27d113

View File

@@ -190,7 +190,8 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
// This will contain $resource and $wrappedResource as arguments in the trace item
$resource = fopen('php://memory', 'rw+');
fwrite($resource, 'test_resource');
$wrappedResource = new TestStreamFoo($resource);
$wrappedResource = new TestFooNorm;
$wrappedResource->foo = $resource;
// Just do something stupid with a resource/wrapped resource as argument
array_keys($wrappedResource);
} catch (\Exception $e) {
@@ -207,9 +208,9 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
);
if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
$pattern = '%"wrappedResource":"\[object\] \(Monolog\\\\\\\\Formatter\\\\\\\\TestStreamFoo: BAR - test_resource\)"%';
$pattern = '%"wrappedResource":"\[object\] \(Monolog\\\\\\\\Formatter\\\\\\\\TestFooNorm: \)"%';
} else {
$pattern = '%\\\\"resource\\\\":null%';
$pattern = '%\\\\"foo\\\\":null%';
}
// Tests that the wrapped resource is ignored while encoding, only works for PHP <= 5.4