Output only to stderr in unit tests
[lhc/web/wiklou.git] / tests / phpunit / includes / session / PHPSessionHandlerTest.php
index 0135bb9..045ba2f 100644 (file)
@@ -15,15 +15,6 @@ class PHPSessionHandlerTest extends MediaWikiTestCase {
        private function getResetter( &$rProp = null ) {
                $reset = [];
 
        private function getResetter( &$rProp = null ) {
                $reset = [];
 
-               // Ignore "headers already sent" warnings during this test
-               set_error_handler( function ( $errno, $errstr ) use ( &$warnings ) {
-                       if ( preg_match( '/[hH]eaders already sent/', $errstr ) ) {
-                               return true;
-                       }
-                       return false;
-               } );
-               $reset[] = new \Wikimedia\ScopedCallback( 'restore_error_handler' );
-
                $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                $rProp->setAccessible( true );
                if ( $rProp->getValue() ) {
                $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
                $rProp->setAccessible( true );
                if ( $rProp->getValue() ) {