Merge "Remove unused function: isStructuredFilterUiEnabledByDefault"
[lhc/web/wiklou.git] / tests / phpunit / includes / auth / LocalPasswordPrimaryAuthenticationProviderTest.php
index 4d60342..5f37078 100644 (file)
@@ -221,8 +221,12 @@ class LocalPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestCase
                $req->password = 'DoesNotExist';
                $ret = $provider->beginPrimaryAuthentication( $reqs );
                $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( $reqs )
+                       AuthenticationResponse::FAIL,
+                       $ret->status
+               );
+               $this->assertEquals(
+                       'wrongpassword',
+                       $ret->message->getKey()
                );
 
                // Validation failure
@@ -626,7 +630,7 @@ class LocalPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestCase
                $req->password = 'bar';
 
                $expect = AuthenticationResponse::newPass( 'Foo' );
-               $expect->createRequest = clone( $req );
+               $expect->createRequest = clone $req;
                $expect->createRequest->username = 'Foo';
                $this->assertEquals( $expect, $provider->beginPrimaryAccountCreation( $user, $user, $reqs ) );