X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fauth%2FLocalPasswordPrimaryAuthenticationProviderTest.php;h=5f370785f724b2f28242631a0069bf814ff4eb89;hb=b48174c3a8d57c0467a2968cc8268c93bf55b9d1;hp=4d603422f2a2630b5c43f8ac1e590d4971937d2d;hpb=79ae60f0e67797ee0ff898885dbd0f0822783efd;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php index 4d603422f2..5f370785f7 100644 --- a/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php +++ b/tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php @@ -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 ) );