aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auth
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2015-10-23 02:44:41 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2016-01-04 03:38:28 +0100
commit8ed59fb82a9381914a4ccce91c0c5fac44616556 (patch)
tree618006f3a8ff6065146c6bf2888ba6f103e29f32 /tests/auth
parente738dad729e3ade5d7033cb5cd15bceb50a5e4d3 (diff)
downloadforums-8ed59fb82a9381914a4ccce91c0c5fac44616556.tar
forums-8ed59fb82a9381914a4ccce91c0c5fac44616556.tar.gz
forums-8ed59fb82a9381914a4ccce91c0c5fac44616556.tar.bz2
forums-8ed59fb82a9381914a4ccce91c0c5fac44616556.tar.xz
forums-8ed59fb82a9381914a4ccce91c0c5fac44616556.zip
[ticket/14250] Change token_storage class to fit changed interface
PHPBB3-14250
Diffstat (limited to 'tests/auth')
-rw-r--r--tests/auth/provider_oauth_token_storage_test.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auth/provider_oauth_token_storage_test.php b/tests/auth/provider_oauth_token_storage_test.php
index 78b936ee8e..ae5de6aa7e 100644
--- a/tests/auth/provider_oauth_token_storage_test.php
+++ b/tests/auth/provider_oauth_token_storage_test.php
@@ -22,6 +22,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
protected $session_id;
protected $token_storage;
protected $token_storage_table;
+ protected $state_table;
protected $user;
protected function setup()
@@ -36,6 +37,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
$this->user = new \phpbb\user($lang, '\phpbb\datetime');
$this->service_name = 'auth.provider.oauth.service.testing';
$this->token_storage_table = 'phpbb_oauth_tokens';
+ $this->state_table = 'phpbb_oauth_states';
// Give the user a session_id that we will remember
$this->session_id = '12345';
@@ -44,7 +46,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
// Set the user id to anonymous
$this->user->data['user_id'] = ANONYMOUS;
- $this->token_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table);
+ $this->token_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table, $this->state_table);
}
public function getDataSet()
@@ -98,7 +100,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
$expected_token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES);
// Store a token in the database
- $temp_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table);
+ $temp_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table, $this->state_table);
$temp_storage->storeAccessToken($this->service_name, $expected_token);
unset($temp_storage);
@@ -129,7 +131,7 @@ class phpbb_auth_provider_oauth_token_storage_test extends phpbb_database_test_c
$expected_token = new StdOAuth2Token('access', 'refresh', StdOAuth2Token::EOL_NEVER_EXPIRES);
// Store a token in the database
- $temp_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table);
+ $temp_storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->token_storage_table, $this->state_table);
$temp_storage->storeAccessToken($this->service_name, $expected_token);
unset($temp_storage);