mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 20:13:28 +00:00
Add AuthenticationServiceProvider
This commit is contained in:
@@ -160,7 +160,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSearch_recordsWithRecords()
|
||||
{
|
||||
$auth = new \Session_Authentication_None(self::$DI['user']);
|
||||
self::$DI['app']->openAccount($auth);
|
||||
self::$DI['app']['authentication']->openAccount($auth);
|
||||
|
||||
$record = \record_adapter::createFromFile(BorderFile::buildFromPathfile(__DIR__ . '/../../../files/cestlafete.jpg', self::$DI['collection'], self::$DI['app']), self::$DI['app']);
|
||||
|
||||
@@ -241,7 +241,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSearch_recordsWithStories()
|
||||
{
|
||||
$auth = new \Session_Authentication_None(self::$DI['user']);
|
||||
self::$DI['app']->openAccount($auth);
|
||||
self::$DI['app']['authentication']->openAccount($auth);
|
||||
|
||||
$story = \record_adapter::createStory(self::$DI['app'], self::$DI['collection']);
|
||||
|
||||
@@ -274,7 +274,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSearchWithStories()
|
||||
{
|
||||
$auth = new \Session_Authentication_None(self::$DI['user']);
|
||||
self::$DI['app']->openAccount($auth);
|
||||
self::$DI['app']['authentication']->openAccount($auth);
|
||||
|
||||
$story = \record_adapter::createStory(self::$DI['app'], self::$DI['collection']);
|
||||
|
||||
@@ -310,7 +310,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
public function testSearchWithRecords()
|
||||
{
|
||||
$auth = new \Session_Authentication_None(self::$DI['user']);
|
||||
self::$DI['app']->openAccount($auth);
|
||||
self::$DI['app']['authentication']->openAccount($auth);
|
||||
|
||||
$record = \record_adapter::createFromFile(BorderFile::buildFromPathfile(__DIR__ . '/../../../files/cestlafete.jpg', self::$DI['collection'], self::$DI['app']), self::$DI['app']);
|
||||
|
||||
@@ -563,7 +563,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
$repo = $em->getRepository('\Entities\Basket');
|
||||
|
||||
/* @var $repo \Repositories\BasketRepository */
|
||||
$basket = $repo->findUserBasket(self::$DI['app'], $response['response']['basket']['basket_id'], self::$DI['app']['phraseanet.user'], true);
|
||||
$basket = $repo->findUserBasket(self::$DI['app'], $response['response']['basket']['basket_id'], self::$DI['app']['authentication']->getUser(), true);
|
||||
|
||||
$this->assertTrue($basket instanceof \Entities\Basket);
|
||||
$em->remove($basket);
|
||||
@@ -572,7 +572,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testDelete_basket()
|
||||
{
|
||||
$usr_id = self::$DI['app']['phraseanet.user']->get_id();
|
||||
$usr_id = self::$DI['app']['authentication']->getUser()->get_id();
|
||||
$user = User_Adapter::getInstance($usr_id, self::$DI['app']);
|
||||
|
||||
$em = self::$DI['app']['EM'];
|
||||
@@ -604,7 +604,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testGet_basket()
|
||||
{
|
||||
$usr_id = self::$DI['app']['phraseanet.user']->get_id();
|
||||
$usr_id = self::$DI['app']['authentication']->getUser()->get_id();
|
||||
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
@@ -617,7 +617,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testSet_basket_title()
|
||||
{
|
||||
$usr_id = self::$DI['app']['phraseanet.user']->get_id();
|
||||
$usr_id = self::$DI['app']['authentication']->getUser()->get_id();
|
||||
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
@@ -636,7 +636,7 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
|
||||
|
||||
public function testSet_basket_description()
|
||||
{
|
||||
$usr_id = self::$DI['app']['phraseanet.user']->get_id();
|
||||
$usr_id = self::$DI['app']['authentication']->getUser()->get_id();
|
||||
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
|
Reference in New Issue
Block a user