zip.php 641 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. require_once('archive.php');
  9. if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){
  10. class Test_Archive_ZIP extends Test_Archive{
  11. protected function getExisting(){
  12. $dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
  13. return new OC_Archive_ZIP($dir.'/data.zip');
  14. }
  15. protected function getNew(){
  16. return new OC_Archive_ZIP(OCP\Files::tmpFile('.zip'));
  17. }
  18. }
  19. }else{
  20. abstract class Test_Archive_ZIP extends Test_Archive{}
  21. }