Renamed get/setExpiresIn to get/setAccessTokenTTL

This commit is contained in:
Alex Bilbie
2013-05-08 10:35:13 -07:00
parent c77484e97b
commit d6932cbb5e
10 changed files with 49 additions and 49 deletions

View File

@@ -56,8 +56,8 @@ class Refresh_Token_test extends PHPUnit_Framework_TestCase
$this->assertArrayHasKey('expires_in', $v);
$this->assertArrayHasKey('refresh_token', $v);
$this->assertEquals($a->getExpiresIn(), $v['expires_in']);
$this->assertEquals(time()+$a->getExpiresIn(), $v['expires']);
$this->assertEquals($a->getAccessTokenTTL(), $v['expires_in']);
$this->assertEquals(time()+$a->getAccessTokenTTL(), $v['expires']);
}
/**
@@ -198,8 +198,8 @@ class Refresh_Token_test extends PHPUnit_Framework_TestCase
$this->assertArrayHasKey('expires_in', $v);
$this->assertArrayHasKey('refresh_token', $v);
$this->assertEquals($a->getExpiresIn(), $v['expires_in']);
$this->assertEquals(time()+$a->getExpiresIn(), $v['expires']);
$this->assertEquals($a->getAccessTokenTTL(), $v['expires_in']);
$this->assertEquals(time()+$a->getAccessTokenTTL(), $v['expires']);
}
public function test_issueAccessToken_refreshTokenGrant()
@@ -237,8 +237,8 @@ class Refresh_Token_test extends PHPUnit_Framework_TestCase
$this->assertArrayHasKey('expires_in', $v);
$this->assertArrayHasKey('refresh_token', $v);
$this->assertEquals($a->getExpiresIn(), $v['expires_in']);
$this->assertEquals(time()+$a->getExpiresIn(), $v['expires']);
$this->assertEquals($a->getAccessTokenTTL(), $v['expires_in']);
$this->assertEquals(time()+$a->getAccessTokenTTL(), $v['expires']);
}
public function test_issueAccessToken_refreshTokenGrant_customExpiresIn()
@@ -262,7 +262,7 @@ class Refresh_Token_test extends PHPUnit_Framework_TestCase
$a = $this->returnDefault();
$grant = new OAuth2\Grant\RefreshToken($a);
$grant->setExpiresIn(30);
$grant->setAccessTokenTTL(30);
$a->addGrantType($grant);
$v = $a->issueAccessToken(array(
@@ -278,8 +278,8 @@ class Refresh_Token_test extends PHPUnit_Framework_TestCase
$this->assertArrayHasKey('expires_in', $v);
$this->assertArrayHasKey('refresh_token', $v);
$this->assertNotEquals($a->getExpiresIn(), $v['expires_in']);
$this->assertNotEquals(time()+$a->getExpiresIn(), $v['expires']);
$this->assertNotEquals($a->getAccessTokenTTL(), $v['expires_in']);
$this->assertNotEquals(time()+$a->getAccessTokenTTL(), $v['expires']);
$this->assertEquals(30, $v['expires_in']);
$this->assertEquals(time()+30, $v['expires']);
}