diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-09-06 19:47:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 19:47:24 +0200 |
commit | 392e64395ac4b126ce86b24ff9dadd03e44b1c2b (patch) | |
tree | 289365353cc90cdb23ceff17e12dd6daa1ae061c /tests | |
parent | d09bf0b9ff183c3bce4aa14694d529e677dbd055 (diff) | |
parent | 444779ce96d8b5ef0086dab524a3540c89b3f042 (diff) | |
download | nextcloud-server-392e64395ac4b126ce86b24ff9dadd03e44b1c2b.tar.gz nextcloud-server-392e64395ac4b126ce86b24ff9dadd03e44b1c2b.zip |
Merge pull request #6247 from nextcloud/oauth-state-undefined
Fix undefined index oauthState
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Core/Controller/ClientFlowLoginControllerTest.php | 12 |
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' ); |