mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Update tests to use DI
This commit is contained in:
@@ -18,15 +18,15 @@ class API_OAuth2_RefreshTokenTest extends PhraseanetPHPUnitAbstract
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$appbox = self::$application['phraseanet.appbox'];
|
||||
$this->application = API_OAuth2_Application::create(self::$application, self::$DI['user'], 'test app');
|
||||
$this->account = API_OAuth2_Account::load_with_user(self::$application, $this->application, self::$DI['user']);
|
||||
$appbox = self::$DI['app']['phraseanet.appbox'];
|
||||
$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']);
|
||||
|
||||
$expires = time() + 100;
|
||||
$this->token = random::generatePassword(8);
|
||||
$this->scope = 'scopidou';
|
||||
|
||||
$this->object = API_OAuth2_RefreshToken::create(self::$application, $this->account, $expires, $this->token, $this->scope);
|
||||
$this->object = API_OAuth2_RefreshToken::create(self::$DI['app'], $this->account, $expires, $this->token, $this->scope);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
|
Reference in New Issue
Block a user