mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 04:53:26 +00:00
Add improvements to unit tests
This commit is contained in:
@@ -14,8 +14,7 @@ class API_OAuth2_RefreshTokenTest extends \PhraseanetTestCase
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->application = API_OAuth2_Application::create(self::$DI['app'], self::$DI['user'], 'test app');
|
||||
$this->account = API_OAuth2_Account::load_with_user(self::$DI['app'], $this->application, self::$DI['user']);
|
||||
$this->account = API_OAuth2_Account::load_with_user(self::$DI['app'], self::$DI['oauth2-app-user'], self::$DI['user']);
|
||||
|
||||
$expires = time() + 100;
|
||||
$this->token = random::generatePassword(8);
|
||||
@@ -24,12 +23,6 @@ class API_OAuth2_RefreshTokenTest extends \PhraseanetTestCase
|
||||
$this->object = API_OAuth2_RefreshToken::create(self::$DI['app'], $this->account, $expires, $this->token, $this->scope);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
$this->application->delete();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testGet_value()
|
||||
{
|
||||
$this->assertEquals($this->token, $this->object->get_value());
|
||||
|
Reference in New Issue
Block a user