예제 #1
0
 public function setUp()
 {
     self::$DI['app'] = $this->loadApp();
     self::dropDatabase();
     parent::setUp();
     self::dropDatabase();
 }
예제 #2
0
 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"];
 }
예제 #3
0
 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();
 }
예제 #4
0
 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');
     }
 }
예제 #5
0
 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();
 }
예제 #6
0
 /**
  * @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);
 }
예제 #7
0
 public function setUp()
 {
     parent::setUp();
     $this->tmpFile = sys_get_temp_dir() . '/' . time() . mt_rand(1000, 9999) . '.jpg';
     copy(__DIR__ . '/../../../../../files/cestlafete.jpg', $this->tmpFile);
 }
예제 #8
0
 public function setUp()
 {
     parent::setUp();
     self::$DI['app']['notification.deliverer'] = $this->getMockBuilder('Alchemy\\Phrasea\\Notification\\Deliverer')->disableOriginalConstructor()->getMock();
 }
예제 #9
0
 public function setUp()
 {
     parent::setUp();
     self::resetUsersRights(self::$DI['app'], self::$DI['user_alt2']);
 }
예제 #10
0
 public function setUp()
 {
     parent::setUp();
     $this->usersParameters = ["users" => implode(';', [self::$DI['user']->getId(), self::$DI['user_alt1']->getId()])];
 }
예제 #11
0
 public function setUp()
 {
     parent::setUp();
     self::$DI['app']['dispatcher']->removeSubscriber(self::$DI['app']['phraseanet.session-manager-subscriber']);
 }
예제 #12
0
 public function setUp()
 {
     parent::setUp();
     $this->dropDatabase();
 }
예제 #13
0
 public function setUp()
 {
     parent::setUp();
     $databoxes = self::$DI['app']['phraseanet.appbox']->get_databoxes();
     $this->databox = array_shift($databoxes);
 }