From 2c3e7cf5f29a4bd896e02987ade0878f51d99cbe Mon Sep 17 00:00:00 2001 From: Niels Keurentjes Date: Mon, 25 Jan 2016 23:51:11 +0100 Subject: [PATCH] Unit tests fail in a nasty way if ErrorHandler test is run before the Silencer and it's not silencing itself. --- tests/Composer/Test/Util/SilencerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Composer/Test/Util/SilencerTest.php b/tests/Composer/Test/Util/SilencerTest.php index 2926cc2a4..3bf913480 100644 --- a/tests/Composer/Test/Util/SilencerTest.php +++ b/tests/Composer/Test/Util/SilencerTest.php @@ -29,12 +29,12 @@ class SilencerTest extends \PHPUnit_Framework_TestCase // Check warnings are suppressed correctly Silencer::suppress(); - trigger_error('Test', E_USER_WARNING); + @trigger_error('Test', E_USER_WARNING); Silencer::restore(); // Check all parameters and return values are passed correctly in a silenced call. $result = Silencer::call(function($a, $b, $c) { - trigger_error('Test', E_USER_WARNING); + @trigger_error('Test', E_USER_WARNING); return $a * $b * $c; }, 2, 3, 4); $this->assertEquals(24, $result);