Merge remote branch 'Seldaek/exception_test'

* Seldaek/exception_test:
  [HttpKernel] Fix console output for reals
This commit is contained in:
Fabien Potencier 2011-05-03 13:43:49 +02:00
commit 3c2b3f2537

View File

@ -45,9 +45,8 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
*/
public function testHandleWithoutLogger($event, $event2)
{
// store the current log_errors, and disable it temporarily
$logErrors = ini_set('log_errors', false);
$errorLog = ini_set('error_log', '/dev/null');
// store the current error_log, and disable it temporarily
$errorLog = ini_set('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul');
$l = new ExceptionListener('foo');
$l->onCoreException($event);
@ -60,8 +59,7 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
$this->assertSame('foo', $e->getMessage());
}
// restore the old settings
ini_set('log_errors', $logErrors);
// restore the old error_log
ini_set('error_log', $errorLog);
}