forked from vufind-org/vufind
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4d1426
commit 3c76096
Showing
3 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,7 +182,7 @@ public function testBadLoginResponse() | |
{ | ||
$this->expectException(\VuFind\Exception\Auth::class); | ||
|
||
// VuFind requires the ILS driver to return a value in catUsername | ||
// VuFind requires the ILS driver to return a value in cat_username | ||
// by default -- if that is missing, we should fail. | ||
$response = []; | ||
$driver = $this->getMockDriver(); | ||
|
@@ -200,7 +200,7 @@ public function testBadLoginResponse() | |
public function testLogin() | ||
{ | ||
$response = [ | ||
'catUsername' => 'testuser', 'catPassword' => 'testpass', | ||
'cat_username' => 'testuser', 'cat_password' => 'testpass', | ||
'email' => '[email protected]', | ||
]; | ||
$driver = $this->getMockDriver(); | ||
|
@@ -223,7 +223,7 @@ public function testLoginWithMissingCatId() | |
$this->expectExceptionMessage('authentication_error_technical'); | ||
|
||
$response = [ | ||
'catUsername' => 'testuser', 'catPassword' => 'testpass', | ||
'cat_username' => 'testuser', 'cat_password' => 'testpass', | ||
'email' => '[email protected]', | ||
]; | ||
$driver = $this->getMockDriver(); | ||
|
@@ -248,7 +248,7 @@ public function testUpdateUserPasswordWithEmptyValue() | |
$this->expectException(\VuFind\Exception\Auth::class); | ||
$this->expectExceptionMessage('Password cannot be blank'); | ||
|
||
$patron = ['catUsername' => 'testuser']; | ||
$patron = ['cat_username' => 'testuser']; | ||
$request = $this->getLoginRequest( | ||
[ | ||
'oldpwd' => 'foo', | ||
|
@@ -296,7 +296,7 @@ public function testUpdateUserPasswordWithMismatch() | |
'password2' => 'fail', | ||
] | ||
); | ||
$patron = ['catUsername' => 'testuser']; | ||
$patron = ['cat_username' => 'testuser']; | ||
$this->getAuth(null, $patron)->updatePassword($request); | ||
} | ||
|
||
|
@@ -317,7 +317,7 @@ public function testUpdateUserPassword() | |
$driver = $this->getMockDriver('Demo', ['changePassword']); | ||
$driver->expects($this->once())->method('changePassword') | ||
->will($this->returnValue(['success' => true])); | ||
$patron = ['catUsername' => 'testuser']; | ||
$patron = ['cat_username' => 'testuser']; | ||
$user = $this->getAuth($driver, $patron)->updatePassword($request); | ||
$this->assertEquals('testuser', $user->getUsername()); | ||
$this->assertEquals('newpass', $user->getRawCatPassword()); | ||
|
@@ -340,7 +340,7 @@ public function testUpdateUserPasswordUsingCatIdField() | |
$driver = $this->getMockDriver('Demo', ['changePassword']); | ||
$driver->expects($this->once())->method('changePassword') | ||
->will($this->returnValue(['success' => true])); | ||
$patron = ['catUsername' => 'testuser', 'cat_id' => '1234']; | ||
$patron = ['cat_username' => 'testuser', 'cat_id' => '1234']; | ||
$auth = $this->getAuth($driver, $patron); | ||
$config = ['Authentication' => ['ILS_username_field' => 'cat_id']]; | ||
$auth->setConfig(new \VuFind\Config\Config($config)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,8 +268,8 @@ protected function getMockIlsConnection(?bool $blocks): Connection | |
'id' => 1, | ||
'firstname' => 'Lib', | ||
'lastname' => 'Rarian', | ||
'catUsername' => 'user', | ||
'catPassword' => 'pass', | ||
'cat_username' => 'user', | ||
'cat_password' => 'pass', | ||
'email' => '[email protected]', | ||
'major' => null, | ||
'college' => null, | ||
|