public function test_retrieve_access_token_by_session_from_db() { $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->storeAccessToken($this->service_name, $expected_token); unset($temp_storage); // Test to see if the token can be retrieved $stored_token = $this->token_storage->retrieve_access_token_by_session($this->service_name); $this->assertEquals($expected_token, $stored_token); }