Example #1
0
 /**
  * @covers OAuth\Common\Storage\Session::__construct
  * @covers OAuth\Common\Storage\Session::storeAccessToken
  * @covers OAuth\Common\Storage\Session::clearAllTokens
  *
  * @runInSeparateProcess
  */
 public function testClearAllTokens()
 {
     $storage = new Session();
     $storage->storeAccessToken('foo', $this->getMock('\\OAuth\\Common\\Token\\TokenInterface'));
     $storage->storeAccessToken('bar', $this->getMock('\\OAuth\\Common\\Token\\TokenInterface'));
     $this->assertTrue($storage->hasAccessToken('foo'));
     $this->assertTrue($storage->hasAccessToken('bar'));
     $this->assertInstanceOf('\\OAuth\\Common\\Storage\\Session', $storage->clearAllTokens());
     $this->assertFalse($storage->hasAccessToken('foo'));
     $this->assertFalse($storage->hasAccessToken('bar'));
 }
 public function hasAccessToken()
 {
     $storage = new Session();
     return $storage->hasAccessToken(self::_SERVICE);
 }