1
0
Fork 0

Unit tests fail in a nasty way if ErrorHandler test is run before the Silencer and it's not silencing itself.

pull/4827/head
Niels Keurentjes 2016-01-25 23:51:11 +01:00
parent 76c1645a0e
commit 2c3e7cf5f2
1 changed files with 2 additions and 2 deletions

View File

@ -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);