X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsession%2FPHPSessionHandlerTest.php;h=045ba2f08cc0af9277bc8675d5a4d02af32e9611;hp=54a31b53bd968d88e80c46f4f9ac1594f83cb05f;hb=7a547df7c08e0236ba09376cf786de747a4eb19c;hpb=f673cfd18a0fa8eb1c9ef0a34e2c1eb9c124a5e9 diff --git a/tests/phpunit/includes/session/PHPSessionHandlerTest.php b/tests/phpunit/includes/session/PHPSessionHandlerTest.php index 54a31b53bd..045ba2f08c 100644 --- a/tests/phpunit/includes/session/PHPSessionHandlerTest.php +++ b/tests/phpunit/includes/session/PHPSessionHandlerTest.php @@ -15,15 +15,6 @@ class PHPSessionHandlerTest extends MediaWikiTestCase { 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( '/headers 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() ) { @@ -130,9 +121,9 @@ class PHPSessionHandlerTest extends MediaWikiTestCase { ); $wrap->setEnableFlags( 'warn' ); - \MediaWiki\suppressWarnings(); + \Wikimedia\suppressWarnings(); ini_set( 'session.serialize_handler', $handler ); - \MediaWiki\restoreWarnings(); + \Wikimedia\restoreWarnings(); if ( ini_get( 'session.serialize_handler' ) !== $handler ) { $this->markTestSkipped( "Cannot set session.serialize_handler to \"$handler\"" ); }