summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-08 13:04:58 +0200
committerGitHub <noreply@github.com>2020-07-08 13:04:58 +0200
commit778cb3357636d4587f7218024b45aa71f2afc25f (patch)
treeddd182662d3c1e80fb4067366ea48ab98c8028ee /tests
parentcb5d3b29037dfadd54a7d6dc4fcdded42795a9d4 (diff)
parentc173602f8812401402cd7cd648c1fe5609c4fc47 (diff)
downloadnextcloud-server-778cb3357636d4587f7218024b45aa71f2afc25f.tar.gz
nextcloud-server-778cb3357636d4587f7218024b45aa71f2afc25f.zip
Merge pull request #21499 from lmamane/stable18-21285-oneliner
fix #21285 as oneliner
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/LoginCredentials/StoreTest.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php
index b75e1498889..259d852f808 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();