Example #1
0
 public function testCwdIsNotChangedAfterSettingRelativeBase()
 {
     $cwd = getcwd();
     $dir = 'tests';
     $relativeTo = realpath(__DIR__ . '/../../../');
     $this->zipper->setRelativePathAsBase($dir, $relativeTo);
     $this->zipper->add('samples');
     $this->assertEquals($cwd, getcwd());
 }
Example #2
0
 /**
  * Saves the files into the extraction directory
  */
 public function extract()
 {
     $this->zipper->add($this->dir);
     $this->extractedFiles[] = $dir = $this->extractionDir . '/' . date("Y-m-d_H-i-s") . '_' . $this->destinationFile;
     $this->zipper->setDestination($dir);
     foreach ($this->excludes as $exclude) {
         $this->zipper->exclude($exclude);
     }
     $this->zipper->compress();
 }