mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Fix tests
This commit is contained in:
@@ -9,12 +9,6 @@ class ACLTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
*/
|
||||
protected static $object;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
parent::setUpBeforeClass();
|
||||
self::$object = self::$DI['app']['acl']->get(self::$DI['user']);
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
/**
|
||||
@@ -43,6 +37,15 @@ class ACLTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
parent::tearDownAfterClass();
|
||||
}
|
||||
|
||||
public function setup()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
if (null === self::$object) {
|
||||
self::$object = self::$DI['app']['acl']->get(self::$DI['user']);
|
||||
}
|
||||
}
|
||||
|
||||
public function testHasAccesToRecord()
|
||||
{
|
||||
$this->assertTrue(self::$object->has_status_access_to_record(self::$DI['record_1']));
|
||||
|
@@ -677,7 +677,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$feedItem = $this->insertOneFeedItem(self::$DI['user']);
|
||||
$feed = $feedItem->getEntry()->getFeed();
|
||||
|
||||
$feeds = self::$DI['app']['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser(self::$DI['user']);
|
||||
$feeds = self::$DI['app']['EM']->getRepository('Alchemy\Phrasea\Model\Entities\Feed')->getAllForUser(self::$DI['app']['acl']->get(self::$DI['user']));
|
||||
foreach ($feeds as $feed) {
|
||||
$result = $this->object->get_publication($request, $feed->getId(), self::$DI['user']);
|
||||
$this->checkResponseField($result, "feed", 'array');
|
||||
|
Reference in New Issue
Block a user