diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Authentication/LoginCredentials/StoreTest.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index 0a9a133746e..c58bb09faaa 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -13,7 +13,6 @@ use OC\Authentication\LoginCredentials\Credentials; use OC\Authentication\LoginCredentials\Store; use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; -use OC\Security\Crypto; use OCP\Authentication\Exceptions\CredentialsUnavailableException; use OCP\ISession; use OCP\Security\ICrypto; @@ -43,9 +42,9 @@ class StoreTest extends TestCase { $this->session = $this->createMock(ISession::class); $this->tokenProvider = $this->createMock(IProvider::class); $this->logger = $this->createMock(LoggerInterface::class); - $this->crypto = $this->createMock(Crypto::class); + $this->crypto = $this->createMock(ICrypto::class); - $this->store = new Store($this->session, $this->logger, $this->tokenProvider, $this->crypto); + $this->store = new Store($this->session, $this->logger, $this->crypto, $this->tokenProvider); } public function testAuthenticate(): void { @@ -60,7 +59,7 @@ class StoreTest extends TestCase { ->with($this->equalTo('login_credentials'), $this->equalTo(json_encode($params))); $this->crypto->expects($this->once()) ->method('encrypt') - ->willReturn($params['password']); + ->willReturn('123456'); $this->store->authenticate($params); } @@ -73,7 +72,7 @@ class StoreTest extends TestCase { } public function testGetLoginCredentialsNoTokenProvider(): void { - $this->store = new Store($this->session, $this->logger, null, $this->crypto); + $this->store = new Store($this->session, $this->logger, $this->crypto, null); $this->expectException(CredentialsUnavailableException::class); |