Test for setRefreshTokenTTL

This commit is contained in:
Alex Bilbie 2013-05-08 10:44:03 -07:00
parent 0b927ddfbb
commit 037fd6e4f7

View File

@ -20,6 +20,14 @@ class Refresh_Token_test extends PHPUnit_Framework_TestCase
return new OAuth2\AuthServer($this->client, $this->session, $this->scope); return new OAuth2\AuthServer($this->client, $this->session, $this->scope);
} }
public function test_setRefreshTokenTTL()
{
$a = $this->returnDefault();
$rt = new OAuth2\Grant\RefreshToken($a);
$rt->setRefreshTokenTTL(30);
$this->assertEquals(30, $rt->getRefreshTokenTTL());
}
public function test_issueAccessToken_with_refresh_token() public function test_issueAccessToken_with_refresh_token()
{ {
$this->client->shouldReceive('getClient')->andReturn(array( $this->client->shouldReceive('getClient')->andReturn(array(