$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
$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 ) );