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:34:36 +0000 |
commit | e253479d83b21ba927b82e359290792636d0a49f (patch) | |
tree | 94184be1af8e451018e8e202b50eefa3ffe4b60c /tests | |
parent | be581d7ce8727cd63a80be2646efb053a4ef64ab (diff) | |
download | nextcloud-server-e253479d83b21ba927b82e359290792636d0a49f.tar.gz nextcloud-server-e253479d83b21ba927b82e359290792636d0a49f.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); } |