mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-19 07:53:14 +00:00
31 lines
873 B
PHP
31 lines
873 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Model\Repositories;
|
|
|
|
use Alchemy\Phrasea\Model\Entities\ApiApplication;
|
|
|
|
/**
|
|
* @group functional
|
|
* @group legacy
|
|
*/
|
|
class ApiApplicationRepositoryTest extends \PhraseanetTestCase
|
|
{
|
|
public function testFindByCreator()
|
|
{
|
|
$app = self::$DI['app']['orm.em']->getRepository('Phraseanet:ApiApplication')->findByCreator(self::$DI['user']);
|
|
$this->assertCount(1, $app);
|
|
}
|
|
|
|
public function testFindByUser()
|
|
{
|
|
$app = self::$DI['app']['orm.em']->getRepository('Phraseanet:ApiApplication')->findByUser(self::$DI['user']);
|
|
$this->assertCount(1, $app);
|
|
}
|
|
|
|
public function testFindAuthorizedAppsByUser()
|
|
{
|
|
$app = self::$DI['app']['orm.em']->getRepository('Phraseanet:ApiApplication')->findAuthorizedAppsByUser(self::$DI['user']);
|
|
$this->assertCount(1, $app);
|
|
}
|
|
}
|