summaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/LostControllerTest.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-11 16:46:43 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-11 17:03:57 +0200
commit0828df5ed4d8488570821b07baaaa7449be3ba64 (patch)
treece837b4b604507015117edbb49ee54a25637402f /tests/Core/Controller/LostControllerTest.php
parent7c23414eef64593803d2e9ecc6e4f17985b7ebcc (diff)
downloadnextcloud-server-0828df5ed4d8488570821b07baaaa7449be3ba64.tar.gz
nextcloud-server-0828df5ed4d8488570821b07baaaa7449be3ba64.zip
Disable the API endpoints as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/Core/Controller/LostControllerTest.php')
-rw-r--r--tests/Core/Controller/LostControllerTest.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index d7d9094c485..d7098aafcc2 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -86,9 +86,13 @@ class LostControllerTest extends \Test\TestCase {
->willReturn('ExistingUser');
$this->config = $this->createMock(IConfig::class);
- $this->config->method('getSystemValue')
- ->with('secret', null)
- ->willReturn('SECRET');
+ $this->config->expects($this->any())
+ ->method('getSystemValue')
+ ->willReturnMap([
+ ['secret', null, 'SECRET'],
+ ['secret', '', 'SECRET'],
+ ['lost_password_link', '', ''],
+ ]);
$this->l10n = $this->createMock(IL10N::class);
$this->l10n
->expects($this->any())
@@ -347,10 +351,6 @@ class LostControllerTest extends \Test\TestCase {
->method('send')
->with($message);
- $this->config->method('getSystemValue')
- ->with('secret', '')
- ->willReturn('SECRET');
-
$this->crypto->method('encrypt')
->with(
$this->equalTo('12348:ThisIsMaybeANotSoSecretToken!'),
@@ -434,10 +434,6 @@ class LostControllerTest extends \Test\TestCase {
->method('send')
->with($message);
- $this->config->method('getSystemValue')
- ->with('secret', '')
- ->willReturn('SECRET');
-
$this->crypto->method('encrypt')
->with(
$this->equalTo('12348:ThisIsMaybeANotSoSecretToken!'),
@@ -516,10 +512,6 @@ class LostControllerTest extends \Test\TestCase {
->with($message)
->will($this->throwException(new \Exception()));
- $this->config->method('getSystemValue')
- ->with('secret', '')
- ->willReturn('SECRET');
-
$this->crypto->method('encrypt')
->with(
$this->equalTo('12348:ThisIsMaybeANotSoSecretToken!'),