X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fauth%2FLegacyHookPreAuthenticationProviderTest.php;h=a4b980f04b92d3b880f699644813ff60fbcd5c9b;hp=b96455e09124c724929c24ccd20143ae1d18b9ca;hb=3df3b575c6617df64ec98533cc7141bd2314e274;hpb=dcdb8e463e3b2be121c61c91df13ea36d270a602 diff --git a/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php b/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php index b96455e091..a4b980f04b 100644 --- a/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php @@ -15,7 +15,8 @@ class LegacyHookPreAuthenticationProviderTest extends \MediaWikiTestCase { * @return LegacyHookPreAuthenticationProvider */ protected function getProvider() { - $request = $this->getMock( 'FauxRequest', [ 'getIP' ] ); + $request = $this->getMockBuilder( 'FauxRequest' ) + ->setMethods( [ 'getIP' ] )->getMock(); $request->expects( $this->any() )->method( 'getIP' )->will( $this->returnValue( '127.0.0.42' ) ); $manager = new AuthManager( @@ -39,7 +40,7 @@ class LegacyHookPreAuthenticationProviderTest extends \MediaWikiTestCase { * @return object $mock->expects( $expect )->method( ... ). */ protected function hook( $hook, $expect ) { - $mock = $this->getMock( __CLASS__, [ "on$hook" ] ); + $mock = $this->getMockBuilder( __CLASS__ )->setMethods( [ "on$hook" ] )->getMock(); $this->mergeMwGlobalArrayValue( 'wgHooks', [ $hook => [ $mock ], ] ); @@ -281,7 +282,7 @@ class LegacyHookPreAuthenticationProviderTest extends \MediaWikiTestCase { * @dataProvider provideTestForAccountCreation * @param string $msg * @param Status|null $status - * @param StatusValue Result + * @param StatusValue $result Result */ public function testTestForAccountCreation( $msg, $status, $result ) { $this->hook( 'AbortNewAccount', $this->once() )