瀏覽代碼

[HttpKernel] Prevent errors leaking out in the console on windows

Jordi Boggiano 14 年之前
父節點
當前提交
d05c59227d
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      tests/Symfony/Tests/Component/HttpKernel/Debug/ExceptionListenerTest.php

+ 5 - 5
tests/Symfony/Tests/Component/HttpKernel/Debug/ExceptionListenerTest.php

@@ -45,9 +45,9 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
      */
     public function testHandleWithoutLogger($event, $event2)
     {
-        //store the current error_log, and set the new one to dev/null
-        $error_log = ini_get('error_log');
-        ini_set('error_log', '/dev/null');
+        //store the current log_errors, and disable it temporarily
+        $logErrors = ini_get('log_errors');
+        ini_set('log_errors', 'Off');
 
         $l = new ExceptionListener('foo');
         $l->onCoreException($event);
@@ -60,8 +60,8 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
             $this->assertSame('foo', $e->getMessage());
         }
 
-        //restore the old error_log
-        ini_set('error_log', $error_log);
+        //restore the old log_errors setting
+        ini_set('log_errors', $logErrors);
     }
 
     /**