示例#1
0
 /**
  * Checks postJob() functionality - whether it modifies a previously created Job.
  */
 public function testPostJob_updatesJob()
 {
     $folder = JasperTestUtils::createFolder();
     $job = JasperTestUtils::createJob($folder);
     $this->jc->putResource('', $folder);
     $jobServerId = $this->jc->putJob($job);
     $job->id = $jobServerId;
     $unique = md5(microtime());
     $job->description = $unique;
     $job->version = '0';
     $this->jc->postJob($job);
     $jobObjFromServer = $this->jc->getJob($jobServerId);
     $this->jc->deleteJob($jobServerId);
     $this->jc->deleteResource($folder->getUriString());
     $this->assertEquals($unique, $jobObjFromServer->description);
 }