Merge "phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat"
[lhc/web/wiklou.git] / tests / phpunit / includes / session / SessionManagerTest.php
index 6273f47..c4b1072 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace MediaWiki\Session;
 
-use AuthPlugin;
 use MediaWikiTestCase;
 use Psr\Log\LogLevel;
 use User;
@@ -780,7 +779,8 @@ class SessionManagerTest extends MediaWikiTestCase {
                $manager = \TestingAccessWrapper::newFromObject( $this->getManager() );
                $manager->setLogger( new \Psr\Log\NullLogger() );
 
-               $mock = $this->getMock( 'stdClass', [ 'shutdown' ] );
+               $mock = $this->getMockBuilder( 'stdClass' )
+                       ->setMethods( [ 'shutdown' ] )->getMock();
                $mock->expects( $this->once() )->method( 'shutdown' );
 
                $manager->allSessionBackends = [ $mock ];
@@ -1005,7 +1005,7 @@ class SessionManagerTest extends MediaWikiTestCase {
                $this->assertFalse( $loadSessionInfoFromStore( $info ) );
                $this->assertSame( [
                        [
-                               LogLevel::WARNING,
+                               LogLevel::INFO,
                                'Session "{session}": Unverified user provided and no metadata to auth it',
                        ]
                ], $logger->getBuffer() );