summaryrefslogtreecommitdiffstats
path: root/apps/files_archive
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-15 13:34:54 +0200
committerRobin Appelman <icewind@owncloud.com>2012-04-15 15:19:30 +0200
commit9ee931e7906f56e651a25f692588eaa586850525 (patch)
tree72d47e864ac8886642c2a667ec80d28e6ee2d8ad /apps/files_archive
parent71cdfdcec89f5cb2bea448998dfbf791555c18f0 (diff)
downloadnextcloud-server-9ee931e7906f56e651a25f692588eaa586850525.tar.gz
nextcloud-server-9ee931e7906f56e651a25f692588eaa586850525.zip
only run archive tests if the test data is available
Diffstat (limited to 'apps/files_archive')
-rw-r--r--apps/files_archive/tests/tar.php18
-rw-r--r--apps/files_archive/tests/zip.php18
2 files changed, 22 insertions, 14 deletions
diff --git a/apps/files_archive/tests/tar.php b/apps/files_archive/tests/tar.php
index 193a65b550a..aa46455e659 100644
--- a/apps/files_archive/tests/tar.php
+++ b/apps/files_archive/tests/tar.php
@@ -8,13 +8,17 @@
require_once('archive.php');
-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');
- }
+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(OC_Helper::tmpFile('.tar.gz'));
+ protected function getNew(){
+ return new OC_Archive_TAR(OC_Helper::tmpFile('.tar.gz'));
+ }
}
+}else{
+ abstract class Test_Archive_TAR extends Test_Archive{}
}
diff --git a/apps/files_archive/tests/zip.php b/apps/files_archive/tests/zip.php
index 3ff713eda70..18a2997c1a5 100644
--- a/apps/files_archive/tests/zip.php
+++ b/apps/files_archive/tests/zip.php
@@ -8,13 +8,17 @@
require_once('archive.php');
-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');
- }
+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(OC_Helper::tmpFile('.zip'));
+ protected function getNew(){
+ return new OC_Archive_ZIP(OC_Helper::tmpFile('.zip'));
+ }
}
+}else{
+ abstract class Test_Archive_ZIP extends Test_Archive{}
}