Merge remote branch 'Seldaek/exception_test'
* Seldaek/exception_test: [HttpKernel] Fix console output for reals
This commit is contained in:
commit
3c2b3f2537
@ -45,9 +45,8 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testHandleWithoutLogger($event, $event2)
|
public function testHandleWithoutLogger($event, $event2)
|
||||||
{
|
{
|
||||||
// store the current log_errors, and disable it temporarily
|
// store the current error_log, and disable it temporarily
|
||||||
$logErrors = ini_set('log_errors', false);
|
$errorLog = ini_set('error_log', file_exists('/dev/null') ? '/dev/null' : 'nul');
|
||||||
$errorLog = ini_set('error_log', '/dev/null');
|
|
||||||
|
|
||||||
$l = new ExceptionListener('foo');
|
$l = new ExceptionListener('foo');
|
||||||
$l->onCoreException($event);
|
$l->onCoreException($event);
|
||||||
@ -60,8 +59,7 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertSame('foo', $e->getMessage());
|
$this->assertSame('foo', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore the old settings
|
// restore the old error_log
|
||||||
ini_set('log_errors', $logErrors);
|
|
||||||
ini_set('error_log', $errorLog);
|
ini_set('error_log', $errorLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user