public function setUp() { self::$DI['app'] = $this->loadApp(); self::dropDatabase(); parent::setUp(); self::dropDatabase(); }
public function setUp() { parent::setUp(); self::$DI['app'] = self::$DI->share(function ($DI) { return $this->loadApp('/lib/Alchemy/Phrasea/Application/Api.php'); }); $this->queryParameters = ["response_type" => "code", "client_id" => self::$DI['oauth2-app-user']->get_client_id(), "redirect_uri" => self::$DI['oauth2-app-user']->get_redirect_uri(), "scope" => "", "state" => "valueTest"]; }
public function setUp() { parent::setUp(); $databoxes = $this->getApplication()->getDataboxes(); // Can not keep databox instance as appbox is cleared $databox = array_shift($databoxes); $this->databox_id = $databox->get_sbas_id(); }
public function setUp() { parent::setUp(); try { self::$api = \Bridge_Api::get_by_api_name(self::$DI['app'], 'apitest'); } catch (\Bridge_Exception_ApiNotFound $e) { self::$api = \Bridge_Api::create(self::$DI['app'], 'apitest'); } try { self::$account = \Bridge_Account::load_account_from_distant_id(self::$DI['app'], self::$api, self::$DI['user'], 'kirikoo'); } catch (\Bridge_Exception_AccountNotFound $e) { self::$account = \Bridge_Account::create(self::$DI['app'], self::$api, self::$DI['user'], 'kirikoo', 'coucou'); } }
public function setUp() { parent::setUp(); if (null === self::$registrationCollections) { self::$registrationCollections = [self::$DI['collection']->get_coll_id()]; } if (null === self::$collections) { self::$collections = [self::$DI['collection']->get_base_id()]; $sxml = simplexml_load_string(self::$DI['collection']->get_prefs()); $sxml->caninscript = 1; $dom = new \DOMDocument(); $dom->loadXML($sxml->asXML()); self::$DI['collection']->set_prefs($dom); } if (null === self::$login) { self::$login = self::$DI['user']->getLogin(); } if (null === self::$email) { self::$email = self::$DI['user']->getEmail(); } $this->enableRegistration(); }
/** * @covers Alchemy\Phrasea\Border\Manager::__construct */ public function setUp() { parent::setUp(); $this->object = new Manager(self::$DI['app']); $this->session = self::$DI['app']['orm.em']->find('Phraseanet:LazaretSession', 1); }
public function setUp() { parent::setUp(); $this->tmpFile = sys_get_temp_dir() . '/' . time() . mt_rand(1000, 9999) . '.jpg'; copy(__DIR__ . '/../../../../../files/cestlafete.jpg', $this->tmpFile); }
public function setUp() { parent::setUp(); self::$DI['app']['notification.deliverer'] = $this->getMockBuilder('Alchemy\\Phrasea\\Notification\\Deliverer')->disableOriginalConstructor()->getMock(); }
public function setUp() { parent::setUp(); self::resetUsersRights(self::$DI['app'], self::$DI['user_alt2']); }
public function setUp() { parent::setUp(); $this->usersParameters = ["users" => implode(';', [self::$DI['user']->getId(), self::$DI['user_alt1']->getId()])]; }
public function setUp() { parent::setUp(); self::$DI['app']['dispatcher']->removeSubscriber(self::$DI['app']['phraseanet.session-manager-subscriber']); }
public function setUp() { parent::setUp(); $this->dropDatabase(); }
public function setUp() { parent::setUp(); $databoxes = self::$DI['app']['phraseanet.appbox']->get_databoxes(); $this->databox = array_shift($databoxes); }