From 131b27d1132efc8a4f8e8ec9b0e56433e12f5237 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 1 Jun 2015 22:33:28 +0100 Subject: [PATCH] Update test for 5.4/5.3 --- tests/Monolog/Formatter/NormalizerFormatterTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Monolog/Formatter/NormalizerFormatterTest.php b/tests/Monolog/Formatter/NormalizerFormatterTest.php index 0ee39348..4ffeded0 100644 --- a/tests/Monolog/Formatter/NormalizerFormatterTest.php +++ b/tests/Monolog/Formatter/NormalizerFormatterTest.php @@ -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