mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add fixtures to sqlite db
This commit is contained in:
@@ -8,7 +8,7 @@ class BasketACLTest extends \PhraseanetTestCase
|
||||
{
|
||||
public function testOwnerIsOwner()
|
||||
{
|
||||
$basket = $this->insertOneBasketEnv();
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 4);
|
||||
|
||||
$acl = new BasketACL();
|
||||
$this->assertTrue($acl->isOwner($basket, self::$DI['user']));
|
||||
@@ -16,7 +16,7 @@ class BasketACLTest extends \PhraseanetTestCase
|
||||
|
||||
public function testParticipantIsNotAnOwner()
|
||||
{
|
||||
$basket = $this->insertOneBasketEnv();
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 4);
|
||||
|
||||
$acl = new BasketACL();
|
||||
$this->assertFalse($acl->isOwner($basket, self::$DI['user_alt1']));
|
||||
@@ -24,15 +24,14 @@ class BasketACLTest extends \PhraseanetTestCase
|
||||
|
||||
public function testUserIsNotTheOwner()
|
||||
{
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 1);
|
||||
$acl = new BasketACL();
|
||||
$this->assertFalse($acl->isOwner($basket, self::$DI['user_alt1']));
|
||||
}
|
||||
|
||||
public function testOwnerHasAccessInValidationEnv()
|
||||
{
|
||||
$basket = $this->insertOneBasketEnv();
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 4);
|
||||
|
||||
$acl = new BasketACL();
|
||||
$this->assertTrue($acl->hasAccess($basket, self::$DI['user']));
|
||||
@@ -40,15 +39,14 @@ class BasketACLTest extends \PhraseanetTestCase
|
||||
|
||||
public function testOwnerHasAccess()
|
||||
{
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 1);
|
||||
$acl = new BasketACL();
|
||||
$this->assertTrue($acl->hasAccess($basket, self::$DI['user']));
|
||||
}
|
||||
|
||||
public function testParticipantHasAccess()
|
||||
{
|
||||
$basket = $this->insertOneBasketEnv();
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 4);
|
||||
|
||||
$acl = new BasketACL();
|
||||
$this->assertTrue($acl->hasAccess($basket, self::$DI['user_alt1']));
|
||||
@@ -56,8 +54,7 @@ class BasketACLTest extends \PhraseanetTestCase
|
||||
|
||||
public function testUserHasNotAccess()
|
||||
{
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$basket = self::$DI['app']['EM']->find('Alchemy\Phrasea\Model\Entities\Basket', 1);
|
||||
$acl = new BasketACL();
|
||||
$this->assertFalse($acl->hasAccess($basket, self::$DI['user_alt1']));
|
||||
}
|
||||
|
Reference in New Issue
Block a user