X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsession%2FPHPSessionHandlerTest.php;h=0135bb91e1c1c912d51705b034320aef2ed3719d;hp=0a2e84e11a454f56caaf10731da4510fb223c8a2;hb=c7246fc2017718ed5f8f3ae056be478678f8a021;hpb=143f36732f4af09ad1696a5f9a18122047004590 diff --git a/tests/phpunit/includes/session/PHPSessionHandlerTest.php b/tests/phpunit/includes/session/PHPSessionHandlerTest.php index 0a2e84e11a..0135bb91e1 100644 --- a/tests/phpunit/includes/session/PHPSessionHandlerTest.php +++ b/tests/phpunit/includes/session/PHPSessionHandlerTest.php @@ -17,7 +17,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase { // Ignore "headers already sent" warnings during this test set_error_handler( function ( $errno, $errstr ) use ( &$warnings ) { - if ( preg_match( '/headers already sent/', $errstr ) ) { + if ( preg_match( '/[hH]eaders already sent/', $errstr ) ) { return true; } return false; @@ -109,7 +109,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase { $reset[] = $this->getResetter( $rProp ); $this->setMwGlobals( [ - 'wgSessionProviders' => [ [ 'class' => 'DummySessionProvider' ] ], + 'wgSessionProviders' => [ [ 'class' => \DummySessionProvider::class ] ], 'wgObjectCacheSessionExpiry' => 2, ] ); @@ -130,9 +130,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\"" ); }