Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Model/Repositories/ApiOauthCodeRepositoryTest.php
2015-06-15 19:30:51 +02:00

18 lines
548 B
PHP

<?php
namespace Alchemy\Tests\Phrasea\Model\Repositories;
/**
* @group functional
* @group legacy
*/
class ApiOauthCodeRepositoryTest extends \PhraseanetTestCase
{
public function testFindByAccount()
{
self::$DI['app']['manipulator.api-oauth-code']->create(self::$DI['oauth2-app-acc-user'], 'http://www.callback.fr', time() + 40);
$codes = self::$DI['app']['orm.em']->getRepository('Phraseanet:ApiOauthCode')->findByAccount(self::$DI['oauth2-app-acc-user']);
$this->assertGreaterThan(0, count($codes));
}
}