setUp() public method

public setUp ( )
 public function setUp()
 {
     parent::setUp();
     $this->pwd = dirname(__FILE__);
     $this->image_location = $this->pwd . "/resources/pitbull.jpg";
     $this->rs = $this->jc->repositoryService();
 }
 public function setUp()
 {
     parent::setUp();
     $this->os = $this->jc->optionsService();
     $this->report_uri = '/reports/samples/Cascading_multi_select_report';
     $this->testSuccess = false;
 }
Beispiel #3
0
 public function setUp()
 {
     parent::setUp();
     $this->fsql = new Environment();
     $this->fsql->define_db('db1', parent::$tempDir);
     $this->fsql->select_db('db1');
 }
 public function setUp()
 {
     parent::setUp();
     parent::createSuperClient();
     $this->ies = $this->jcSuper->importExportService();
     $this->import_file = file_get_contents(dirname(__FILE__) . '/resources/jasperadmin_import.zip');
 }
Beispiel #5
0
 public function setUp()
 {
     parent::setUp();
     $fsql = new Environment();
     $fsql->define_db('db1', parent::$tempDir);
     $this->schema = $fsql->get_database('db1')->getSchema('public');
 }
 public function setUp()
 {
     parent::setUp();
     $this->newUser = u::createUser();
     $this->us = $this->jc->userService();
     $this->us->addOrUpdateUser($this->newUser);
 }
Beispiel #7
0
 public function setUp()
 {
     parent::setUp();
     $dir = __DIR__ . '/03/output';
     if (!is_dir($dir)) {
         mkdir($dir);
     }
 }
Beispiel #8
0
 public function setUp()
 {
     parent::setUp();
     $this->fsql = new Environment();
     $this->fsql->define_db('db1', parent::$tempDir);
     $this->fsql->select_db('db1');
     $this->sequences = new SequencesFile($this->fsql->current_schema());
 }
 /** Coverage: createRole **/
 public function setUp()
 {
     parent::setUp();
     //	$this->newUser = u::createUser();
     $this->rs = $this->jc->roleService();
     $this->newRole = new Role('NOT_A_REAL_ROLE', 'organization_1');
     $this->rs->createRole($this->newRole);
 }
 public function setUp()
 {
     parent::setUp();
     $this->testOrg = new Organization('testorg', 'testorg', 'organization_1', 'testorg');
     $this->subOrg = new Organization('suborg', 'suborg', 'testorg', 'suborg');
     $this->os = $this->jc->organizationService();
     $this->os->createOrganization($this->testOrg);
     $this->os->createOrganization($this->subOrg);
 }
Beispiel #11
0
 public function setUp()
 {
     parent::setUp();
     $fsql = new Environment();
     $database = new Database($fsql, 'db1', parent::$tempDir);
     $database->create();
     $this->schema = $database->getSchema('public');
     $this->sequences = new SequencesFile($this->schema);
 }
 public function setUp()
 {
     parent::setUp();
     $this->user = new User();
     $this->user->setUsername('w00ting');
     $this->dm->persist($this->user);
     $this->dm->flush();
     $this->repository = $this->dm->getRepository('Documents\\User');
 }
 public function setUp()
 {
     parent::setUp();
     $this->simpleXmls = array();
     $this->simpleXmls['WithSignature'] = new \SimpleXMLElement($this->GetEpsData('BankConfirmationDetailsWithSignature.xml'));
     $this->simpleXmls['UnstructuredWithoutSignature'] = new \SimpleXMLElement($this->GetEpsData('BankConfirmationDetailsWithoutSignatureUnstructuredRemittanceIdentifier.xml'));
     $this->simpleXmls['WithoutSignature'] = new \SimpleXMLElement($this->GetEpsData('BankConfirmationDetailsWithoutSignature.xml'));
     $this->simpleXmls['UnstructuredWithSignature'] = new \SimpleXMLElement($this->GetEpsData('BankConfirmationDetailsWithSignatureUnstructuredRemittanceIdentifier.xml'));
 }
Beispiel #14
0
 public function setUp()
 {
     parent::setUp();
     $this->subDir = parent::$tempDir . 'sub/';
     mkdir($this->subDir);
     $fsql = new Environment();
     $fsql->define_db('db1', parent::$tempDir);
     $this->db = $fsql->get_database('db1');
 }
 public function setUp()
 {
     parent::setUp();
     $this->newUser = u::createUser();
     $this->attr = new Attribute('Gender', 'Robot');
     $this->attr2 = new Attribute('Favorite Beer', 'Anchor Steam');
     $this->us = $this->jc->userService();
     $this->us->addOrUpdateUser($this->newUser);
 }
 public function setUp()
 {
     parent::setUp();
     $this->mTransport = new MockTransport();
     $this->mTransport->body = 'bar';
     $this->target = new SoCommunicator();
     $this->target->Transport = $this->mTransport;
     date_default_timezone_set('UTC');
 }
Beispiel #17
0
 function setUp()
 {
     $app =& Dataface_Application::getInstance();
     $path = DATAFACE_SITE_PATH . '/tables/' . $this->mytable;
     if (file_exists($path)) {
         @rmdir($path);
     }
     xf_db_query('drop table if exists `' . $this->mytable . '`', $app->db()) or die(xf_db_error() . ' on line ' . __LINE__ . ' of file ' . __FILE__);
     parent::setUp();
 }
Beispiel #18
0
 function setUp()
 {
     parent::setUp();
     $app =& Dataface_Application::getInstance();
     $sql = "drop table if exists `dataface__translations`";
     $res = xf_db_query($sql, $app->db());
     if (!$res) {
         trigger_error(xf_db_error($app->db()), E_USER_ERROR);
     }
 }
 public function setUp()
 {
     parent::setUp();
     $this->rs = $this->jc->reportService();
     $this->ros = $this->jc->optionsService();
     $this->res = $this->jc->repositoryService();
     $this->sample_report = "/reports/samples/AllAccounts";
     $this->sample_report_size = 220000;
     // pre-determined
 }
 public function setUp()
 {
     parent::setUp();
     $this->getParser()->setSourceDoctype($this->doctypeList[$this->getKey()]);
     $methodName = $this->methodName;
     if (is_null($this->expectedResult)) {
         $this->assertNull($this->getParser()->{$methodName}());
     } else {
         $this->assertEquals($this->expectedResult, $this->getParser()->{$methodName}());
     }
 }
 /** Coverage: createJob, createResource **/
 public function setUp()
 {
     parent::setUp();
     $this->js = $this->jc->jobService();
     $this->rs = $this->jc->repositoryService();
     $this->testFolder = u::createFolder();
     $this->testJob = u::createJob($this->testFolder);
     $this->rs->createResource($this->testFolder, "/");
     // Update local job object with server's response
     $this->testJob = $this->js->createJob($this->testJob);
 }
    public function setUp()
    {
        parent::setUp();
        $this->qs = $this->jc->queryService();
        $this->query = <<<EOF
<query>
    <queryFields>
        <queryField id="public_opportunities.amount"/>
        <queryField id="public_opportunities.name"/>
    </queryFields>
</query>
EOF;
    }
 public function setUp()
 {
     parent::setUp();
     if (version_compare($this->getServerVersion(), '2.6.0', '<')) {
         $this->markTestSkipped('This test is not applicable to server versions < 2.6.0');
     }
     $this->docs = array(array('_id' => 1), array('_id' => 2), array('_id' => 3));
     $this->collection = $this->conn->selectCollection(self::$dbName, 'CommandCursorFunctionalTest');
     $this->collection->drop();
     foreach ($this->docs as $doc) {
         $this->collection->insert($doc);
     }
 }
 public function setUp()
 {
     parent::setUp();
     $this->user = User::getByUsername('super');
     Yii::app()->user->userModel = $this->user;
     EmailAccount::deleteAll();
     EmailMessage::deleteAll();
     EmailMessageContent::deleteAll();
     EmailMessageSender::deleteAll();
     EmailMessageRecipient::deleteAll();
     EmailMessageSendError::deleteAll();
     FileModel::deleteAll();
 }
Beispiel #25
0
 public function setUp()
 {
     parent::setUp();
     $this->doc1 = array('name' => 'A');
     $this->doc2 = array('name' => 'B');
     $this->doc3 = array('name' => 'C');
     $collection = $this->conn->selectCollection(self::$dbName, 'docs');
     $collection->insert($this->doc1);
     $collection->insert($this->doc2);
     $collection->insert($this->doc3);
     $this->cursor = $collection->createQueryBuilder()->getQuery()->execute();
     $this->cursor->sort(array('name' => 1));
 }
 public function setUp()
 {
     parent::setUp();
     $this->jcSuper = new Client($this->bootstrap['hostname'], $this->bootstrap['super_username'], $this->bootstrap['super_password']);
     $this->testFolder = u::createFolder();
     $this->testUser = u::createUser();
     $this->jc->repositoryService()->createResource($this->testFolder, "/", true);
     $this->jc->userService()->addOrUpdateUser($this->testUser);
     $this->ps = $this->jc->permissionService();
     $this->us = $this->jc->userService();
     $this->super_ps = $this->jcSuper->permissionService();
     $this->testPermission = new RepositoryPermission($this->testFolder->uri, "user:/" . $this->testUser->tenantId . "/" . $this->testUser->username, '32');
 }
 /**
  * Creates as much languages as possible
  */
 public function setUp()
 {
     parent::setUp();
     $this->languageService = $this->getRepository()->getContentLanguageService();
     $languageCreate = $this->languageService->newLanguageCreateStruct();
     $languageCreate->enabled = true;
     // Create as much languages as possible
     for ($i = count($this->languageService->loadLanguages()) + 1; $i <= 8 * PHP_INT_SIZE - 2; ++$i) {
         $languageCreate->name = "Language {$i}";
         $languageCreate->languageCode = sprintf("lan-%02d", $i);
         $this->createdLanguages[] = $this->languageService->createLanguage($languageCreate);
     }
 }
Beispiel #28
0
 function setUp()
 {
     $app =& Dataface_Application::getInstance();
     parent::setUp();
     $sql = "create table `md_test1` (\n\t\t\t\tfname varchar(32) NOT NULL,\n\t\t\t\tlname varchar(32) NOT NULL,\n\t\t\t\tage int(11) default 10,\n\t\t\t\tprimary key (`fname`,`lname`))";
     $res = xf_db_query($sql, $app->db());
     if (!$res) {
         trigger_error(xf_db_error($app->db()), E_USER_ERROR);
     }
     $sql = "create table `md_test1__metadata` (\n\t\t\t   fname varchar(32) NOT NULL,\n\t\t\t   lname varchar(32) NOT NULL,\n\t\t\t   __translation_state int(5) default 0,\n\t\t\t   primary key (`fname`,`lname`))";
     $res = xf_db_query($sql, $app->db());
     if (!$res) {
         trigger_error(xf_db_error($app->db()), E_USER_ERROR);
     }
 }
Beispiel #29
0
 function setUp()
 {
     parent::setUp();
     xf_db_query("CREATE TABLE `Pages` (\n\t\t\t`PageID` INT(11) auto_increment NOT NULL,\n\t\t\t`ParentID` INT(11),\n\t\t\t`ShortName` VARCHAR(32) NOT NULL,\n\t\t\t`Description` TEXT,\n\t\t\tPRIMARY KEY (`PageID`),\n\t\t\tUNIQUE (`ParentID`,`ShortName`))") or trigger_error(xf_db_error() . __LINE__);
     xf_db_query("INSERT INTO `Pages` (`PageID`,`ShortName`,`Description`)\n\t\t\tVALUES (1,'index_page','Main page')") or trigger_error(xf_db_error() . __LINE__);
     xf_db_query("INSERT INTO `Pages` (`ParentID`,`ShortName`,`Description`)\n\t\t\tVALUES \n\t\t\t(1,'about','About us'),\n\t\t\t(1,'jobs','Now hiring'),\n\t\t\t(1,'products','About our products'),\n\t\t\t(1,'services','About our services'),\n\t\t\t(1,'contact','Contact us')") or trigger_error(xf_db_error() . __LINE__);
     xf_db_query("INSERT INTO `Pages` (`ParentID`,`ShortName`,`Description`)\n\t\t\tVALUES\n\t\t\t(2,'history','Our history'),\n\t\t\t(2,'future', 'The direction of the company'),\n\t\t\t(3,'application', 'Job application'),\n\t\t\t(3,'current_listing', 'Current job listings'),\n\t\t\t(4,'awards','Product awards'),\n\t\t\t(4,'downloads','Product downlaods'),\n\t\t\t(5,'consultation','Free consultation')") or trigger_error(xf_db_error() . __LINE__);
     $table =& Dataface_Table::loadTable('Pages');
     $r =& $table->relationships();
     if (!isset($r['children'])) {
         $table->addRelationship('children', array('__sql__' => 'select * from Pages where ParentID=\'$PageID\'', 'meta:class' => 'children'));
     }
     $this->indexpage =& df_get_record('Pages', array('PageID' => 1));
     $this->t = new Dataface_TreeTable($this->indexpage);
 }
Beispiel #30
0
 function setUp()
 {
     parent::setUp();
     require_once 'DB/Sync.php';
     require_once 'Dataface/Application.php';
     $app =& Dataface_Application::getInstance();
     $res = xf_db_query("create table a (\n\t\t\tid int(11) not null auto_increment,\n\t\t\ta varchar(32) default 'b',\n\t\t\tb datetime not null,\n\t\t\tprimary key (`id`))", $app->db());
     if (!$res) {
         trigger_error(xf_db_error($app->db()), E_USER_ERROR);
     }
     $res = xf_db_query("create table b (\n\t\t\tid int(12) not null auto_increment,\n\t\t\tb datetime not null,\n\t\t\tprimary key (`id`))", $app->db());
     if (!$res) {
         trigger_error(xf_db_error($app->db()), E_USER_ERROR);
     }
 }