diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-07-09 19:27:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-09 19:27:21 +0200 |
commit | b3c9b166a38b65bc24ee55c111dc19961745fbb2 (patch) | |
tree | 8ad042bd3dc98977db13749723873379a03818c2 /tests/lib | |
parent | b21713a83328a135dcad14f565988225a054c9a8 (diff) | |
parent | ae036b4dfa3f6b8df7366de396b6a337b1dcf0a2 (diff) | |
download | nextcloud-server-b3c9b166a38b65bc24ee55c111dc19961745fbb2.tar.gz nextcloud-server-b3c9b166a38b65bc24ee55c111dc19961745fbb2.zip |
Merge pull request #21779 from nextcloud/backport/21499/stable19
[stable19] fix #21285 as oneliner
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Authentication/LoginCredentials/StoreTest.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index e7b9cb5996f..3a0f0d325a8 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -142,7 +142,8 @@ class StoreTest extends TestCase { } public function testGetLoginCredentialsInvalidTokenLoginCredentials() { - $uid = 'user987'; + $uid = 'id987'; + $user = 'user987'; $password = '7389374'; $this->session->expects($this->once()) @@ -156,11 +157,11 @@ class StoreTest extends TestCase { ->method('exists') ->with($this->equalTo('login_credentials')) ->willReturn(true); - $this->session->expects($this->once()) + $this->session->expects($this->exactly(2)) ->method('get') - ->with($this->equalTo('login_credentials')) - ->willReturn('{"run":true,"uid":"user987","password":"7389374"}'); - $expected = new Credentials('user987', 'user987', '7389374'); + ->withConsecutive(['login_credentials'], ['loginname']) + ->willReturnOnConsecutiveCalls('{"run":true,"uid":"id987","password":"7389374"}', $user); + $expected = new Credentials($uid, $user, $password); $actual = $this->store->getLoginCredentials(); |