public function testCwdIsNotChangedAfterSettingRelativeBase() { $cwd = getcwd(); $dir = 'tests'; $relativeTo = realpath(__DIR__ . '/../../../'); $this->zipper->setRelativePathAsBase($dir, $relativeTo); $this->zipper->add('samples'); $this->assertEquals($cwd, getcwd()); }
/** * 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(); }