diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-05-02 23:48:23 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-05-02 23:48:23 +0200 |
commit | e5ef3e1340f68fdcc46ba318dab1773b8fb530a8 (patch) | |
tree | ab6c54857001552b62254f4950cc6caf45ce7720 /tests/lib/archive | |
parent | 0b51c5344399d9990d46b275afb82fbfbd070ad4 (diff) | |
download | nextcloud-server-e5ef3e1340f68fdcc46ba318dab1773b8fb530a8.tar.gz nextcloud-server-e5ef3e1340f68fdcc46ba318dab1773b8fb530a8.zip |
move archive library to core so we can properly depend on it
Diffstat (limited to 'tests/lib/archive')
-rwxr-xr-x | tests/lib/archive/tar.php | 24 | ||||
-rwxr-xr-x | tests/lib/archive/zip.php | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/tests/lib/archive/tar.php b/tests/lib/archive/tar.php new file mode 100755 index 00000000000..c138a51a651 --- /dev/null +++ b/tests/lib/archive/tar.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +require_once('archive.php'); + +if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){ + class Test_Archive_TAR extends Test_Archive{ + protected function getExisting(){ + $dir=OC::$SERVERROOT.'/apps/files_archive/tests/data'; + return new OC_Archive_TAR($dir.'/data.tar.gz'); + } + + protected function getNew(){ + return new OC_Archive_TAR(OCP\Files::tmpFile('.tar.gz')); + } + } +}else{ + abstract class Test_Archive_TAR extends Test_Archive{} +} diff --git a/tests/lib/archive/zip.php b/tests/lib/archive/zip.php new file mode 100755 index 00000000000..615c9e3c7e2 --- /dev/null +++ b/tests/lib/archive/zip.php @@ -0,0 +1,24 @@ +<?php +/** + * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +require_once('archive.php'); + +if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){ + class Test_Archive_ZIP extends Test_Archive{ + protected function getExisting(){ + $dir=OC::$SERVERROOT.'/apps/files_archive/tests/data'; + return new OC_Archive_ZIP($dir.'/data.zip'); + } + + protected function getNew(){ + return new OC_Archive_ZIP(OCP\Files::tmpFile('.zip')); + } + } +}else{ + abstract class Test_Archive_ZIP extends Test_Archive{} +} |