summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-09-07 09:32:45 +0200
committerGitHub <noreply@github.com>2017-09-07 09:32:45 +0200
commit7c3148f1aae06e898abcbe36fb0e5e64d1d6c910 (patch)
treec451e521c02ed0d1b3dbf2ca428a00394fa0f6c9 /tests
parent9071f60605bc0b1e7932f7a35b768d834a9b2e84 (diff)
parent04583a7587e0038f37ea0216ba217513f93cfb0a (diff)
downloadnextcloud-server-7c3148f1aae06e898abcbe36fb0e5e64d1d6c910.tar.gz
nextcloud-server-7c3148f1aae06e898abcbe36fb0e5e64d1d6c910.zip
Merge pull request #6386 from nextcloud/12-6247
[stable12] Fix undefined index oauthState
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index 1132c0f540c..89253f13038 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -149,6 +149,11 @@ class ClientFlowLoginControllerTest extends TestCase {
->expects($this->once())
->method('set')
->with('client.flow.state.token', 'StateToken');
+ $this->session
+ ->expects($this->once())
+ ->method('get')
+ ->with('oauth.state')
+ ->willReturn('OauthStateToken');
$this->defaults
->expects($this->once())
->method('getName')
@@ -168,6 +173,7 @@ class ClientFlowLoginControllerTest extends TestCase {
'urlGenerator' => $this->urlGenerator,
'stateToken' => 'StateToken',
'serverHost' => 'example.com',
+ 'oauthState' => 'OauthStateToken',
],
'guest'
);
@@ -199,6 +205,11 @@ class ClientFlowLoginControllerTest extends TestCase {
->expects($this->once())
->method('set')
->with('client.flow.state.token', 'StateToken');
+ $this->session
+ ->expects($this->once())
+ ->method('get')
+ ->with('oauth.state')
+ ->willReturn('OauthStateToken');
$this->defaults
->expects($this->once())
->method('getName')
@@ -218,6 +229,7 @@ class ClientFlowLoginControllerTest extends TestCase {
'urlGenerator' => $this->urlGenerator,
'stateToken' => 'StateToken',
'serverHost' => 'example.com',
+ 'oauthState' => 'OauthStateToken',
],
'guest'
);