From c5d2b75022f177ea04dfd0528cd54cd5d95ee16a Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Wed, 24 Jul 2013 16:00:18 -0400 Subject: [PATCH] [feature/oauth] Clear token storage test PHPBB3-11673 --- tests/auth/provider_oauth_token_storage_test.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php index eb489410c7..1d5505ee8e 100644 --- a/tests/auth/provider_oauth_token_storage_test.php +++ b/tests/auth/provider_oauth_token_storage_test.php @@ -118,7 +118,14 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c public function test_clearToken() { + $token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES, array('extra' => 'param') ); + $this->token_storage->storeAccessToken($token); + $this->token_storage->clearToken(); + + $this->assertFalse($this->token_storage->hasAccessToken()); + $row = $this->get_token_row_by_session_id($this->session_id()); + $this->assertFalse($row); } public function test_set_user_id()