Ejemplo n.º 1
0
 public function testSimple()
 {
     $t = new TokenResponse(array("access_token" => "foo", "token_type" => "Bearer", "expires_in" => 5, "scope" => "foo", "refresh_token" => "bar", "unsupported_key" => "foo"));
     $this->assertEquals("foo", $t->getAccessToken());
     $this->assertEquals("Bearer", $t->getTokenType());
     $this->assertEquals(5, $t->getExpiresIn());
     $this->assertEquals("bar", $t->getRefreshToken());
     $this->assertEquals("foo", $t->getScope()->toString());
 }
Ejemplo n.º 2
0
 public function testSimple()
 {
     $t = new TokenResponse(array('access_token' => 'foo', 'token_type' => 'Bearer', 'expires_in' => 5, 'scope' => 'foo', 'refresh_token' => 'bar', 'unsupported_key' => 'foo'));
     $this->assertEquals('foo', $t->getAccessToken());
     $this->assertEquals('Bearer', $t->getTokenType());
     $this->assertEquals(5, $t->getExpiresIn());
     $this->assertEquals('bar', $t->getRefreshToken());
     $this->assertEquals('foo', $t->getScope()->toString());
 }