summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-01-02 11:57:05 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2017-01-11 19:20:11 +0100
commit21d3fe588396ebb3535a947ee4afd514aa24bd78 (patch)
tree7e1d61534c7e58ef00f607980e0b707afd284ad4 /tests/lib
parent6f74ecd94a65485f9cd09434845f3c62e66fb9e5 (diff)
downloadnextcloud-server-21d3fe588396ebb3535a947ee4afd514aa24bd78.tar.gz
nextcloud-server-21d3fe588396ebb3535a947ee4afd514aa24bd78.zip
do not hard-require the token provider
The provider might need DB access and therefore depenedency resolution fails on the setup page where we cannot inject the db implementation. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Authentication/LoginCredentials/StoreTest.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php
index 56277fd0f34..9a719339b43 100644
--- a/tests/lib/Authentication/LoginCredentials/StoreTest.php
+++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php
@@ -58,7 +58,7 @@ class StoreTest extends TestCase {
$this->tokenProvider = $this->createMock(IProvider::class);
$this->logger = $this->createMock(ILogger::class);
- $this->store = new Store($this->session, $this->tokenProvider, $this->logger);
+ $this->store = new Store($this->session, $this->logger, $this->tokenProvider);
}
public function testAuthenticate() {
@@ -81,6 +81,14 @@ class StoreTest extends TestCase {
$this->store->setSession($session);
}
+ public function testGetLoginCredentialsNoTokenProvider() {
+ $this->store = new Store($this->session, $this->logger, null);
+
+ $this->expectException(CredentialsUnavailableException::class);
+
+ $this->store->getLoginCredentials();
+ }
+
public function testGetLoginCredentials() {
$uid = 'uid';
$user = 'user123';