소스 검색

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

Niels Keurentjes 9 년 전
부모
커밋
2c3e7cf5f2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      tests/Composer/Test/Util/SilencerTest.php

+ 2 - 2
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);