Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / tests / phpunit / includes / auth / LegacyHookPreAuthenticationProviderTest.php
index b96455e..a4b980f 100644 (file)
@@ -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() )