diff options
author | yemkareems <yemkareems@gmail.com> | 2024-10-28 15:04:11 +0530 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-10-28 12:32:00 +0000 |
commit | e4c22e02e0a7c0df6f9403761b665c82ced439b7 (patch) | |
tree | cb09c68671e15b8d99f13aa76f5a43180b7fc060 /tests | |
parent | 7fa219e8348f88fd4f8305f5cf03cea0299ba6e0 (diff) | |
download | nextcloud-server-e4c22e02e0a7c0df6f9403761b665c82ced439b7.tar.gz nextcloud-server-e4c22e02e0a7c0df6f9403761b665c82ced439b7.zip |
fix: crypto type made not nullable and tests run using ICrypto
Signed-off-by: yemkareems <yemkareems@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Authentication/LoginCredentials/StoreTest.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index 3e2ee7ea66c..ba3dbf78886 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -30,7 +30,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; @@ -60,9 +59,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() { @@ -77,7 +76,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); } |