public function setUp()
 {
     parent::setUp();
     $this->newUser = u::createUser();
     $this->us = $this->jc->userService();
     $this->us->addOrUpdateUser($this->newUser);
 }
 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);
 }
 /** 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->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');
 }
 /**
  * @expectedException \Jaspersoft\Exception\ResourceServiceException
  * @expectedExceptionMessage CreateResource: You must set either the parentFolder parameter or set a URI for the provided resource.
  */
 public function testExceptionThrown_withoutValidURI_createResource()
 {
     $resource = new JdbcDataSource();
     $resource->driverClass = "org.postgresql.Driver";
     $resource->label = u::makeID();
     $resource->description = "TestDS " . $resource->label;
     $resource->password = "******";
     $resource->username = "******";
     $resource->connectionUrl = "jdbc:postgresql://localhost:5432/foodmart";
     $this->rs->createResource($resource, null);
 }