summaryrefslogtreecommitdiffstats
path: root/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php')
-rw-r--r--tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
index 3fa7a92bb9b..c9dc3d6ef4a 100644
--- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
@@ -61,12 +61,12 @@ class PublicKeyTokenProviderTest extends TestCase {
$this->crypto = \OC::$server->getCrypto();
$this->config = $this->createMock(IConfig::class);
$this->config->method('getSystemValue')
- ->will($this->returnValueMap([
+ ->willReturnMap([
['session_lifetime', 60 * 60 * 24, 150],
['remember_login_cookie_lifetime', 60 * 60 * 24 * 15, 300],
['secret', '', '1f4h9s'],
['openssl', [], []],
- ]));
+ ]);
$this->logger = $this->createMock(ILogger::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->time = 1313131;
@@ -124,7 +124,7 @@ class PublicKeyTokenProviderTest extends TestCase {
$this->mapper->expects($this->once())
->method('getTokenByUser')
->with('uid')
- ->will($this->returnValue(['token']));
+ ->willReturn(['token']);
$this->assertEquals(['token'], $this->tokenProvider->getTokenByUser('uid'));
}
@@ -239,10 +239,10 @@ class PublicKeyTokenProviderTest extends TestCase {
$defaultRememberMeLifetime = 60 * 60 * 24 * 15;
$this->config->expects($this->exactly(2))
->method('getSystemValue')
- ->will($this->returnValueMap([
+ ->willReturnMap([
['session_lifetime', $defaultSessionLifetime, 150],
['remember_login_cookie_lifetime', $defaultRememberMeLifetime, 300],
- ]));
+ ]);
$this->mapper->expects($this->at(0))
->method('invalidateOld')
->with($this->time - 150);