public function testCreation() { $zipper = Xerte_Zip_Factory::factory('test.zip', array()); $this->assertTrue(is_object($zipper)); $this->assertTrue(method_exists($zipper, 'add_files')); }
require_once $xerte_toolkits_site->root_file_path . "website_code/php/screen_size_library.php"; require_once $xerte_toolkits_site->root_file_path . "website_code/php/user_library.php"; require_once $xerte_toolkits_site->root_file_path . "website_code/php/url_library.php"; /* * Set up the paths */ $dir_path = $xerte_toolkits_site->users_file_area_full . $row['template_id'] . "-" . $row['username'] . "-" . $row['template_name'] . "/"; $parent_template_path = $xerte_toolkits_site->basic_template_path . $row['template_framework'] . "/parent_templates/" . $row['template_name'] . "/"; $js_path = $xerte_toolkits_site->basic_template_path . $row['template_framework'] . "/js/"; /* * Make the zip */ $zipfile_tmpname = tempnam(sys_get_temp_dir(), 'xerteExport'); _debug("Temporary zip file is : {$zipfile_tmpname}"); $options = array('basedir' => $dir_path, 'prepand' => "", 'inmemory' => 0, 'overwrite' => 1, 'recurse' => 1, 'storepaths' => 1); $zipfile = Xerte_Zip_Factory::factory($zipfile_tmpname, $options); /* * Copy the core files over from the parent folder */ copy($dir_path . "data.xml", $dir_path . "template.xml"); $xml = new XerteXMLInspector(); $xml->loadTemplateXML($dir_path . 'template.xml'); if ($fullArchive) { _debug("Full archive"); } else { _debug("Deployment archive"); } export_folder_loop($parent_template_path); copy_parent_files(); export_folder_loop($dir_path); /*