public function testClearAllPersistentData()
 {
     $persistent_storage = new PersistentStorage(TEST_CLIENT_ID);
     $rand_key = PersistentStorage::$supported_keys[array_rand(PersistentStorage::$supported_keys)];
     $data = 'test-data';
     $persistent_storage->setPersistentData($rand_key, $data);
     $persistent_storage->clearAllPersistentData();
     $this->assertEquals($persistent_storage->getPersistentData($rand_key, 'default'), 'default');
 }
Ejemplo n.º 2
0
 /**
  * Clear all persistent data. Log out
  */
 public function logout()
 {
     $this->persistent_storage->clearAllPersistentData();
     $this->setState(null);
     $this->setAccessToken(null);
 }