1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00
This commit is contained in:
Jordi Boggiano 2016-01-26 13:07:05 +00:00
parent 64d653ad92
commit 1818b95149
26 changed files with 75 additions and 75 deletions

View file

@ -33,8 +33,9 @@ class SilencerTest extends \PHPUnit_Framework_TestCase
Silencer::restore();
// Check all parameters and return values are passed correctly in a silenced call.
$result = Silencer::call(function($a, $b, $c) {
$result = Silencer::call(function ($a, $b, $c) {
@trigger_error('Test', E_USER_WARNING);
return $a * $b * $c;
}, 2, 3, 4);
$this->assertEquals(24, $result);
@ -50,7 +51,7 @@ class SilencerTest extends \PHPUnit_Framework_TestCase
{
$verification = microtime();
$this->setExpectedException('\RuntimeException', $verification);
Silencer::call(function() use ($verification) {
Silencer::call(function () use ($verification) {
throw new \RuntimeException($verification);
});
}