only run archive tests if the test data is available
This commit is contained in:
parent
71cdfdcec8
commit
9ee931e790
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
require_once('archive.php');
|
require_once('archive.php');
|
||||||
|
|
||||||
class Test_Archive_TAR extends Test_Archive{
|
if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){
|
||||||
|
class Test_Archive_TAR extends Test_Archive{
|
||||||
protected function getExisting(){
|
protected function getExisting(){
|
||||||
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
|
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
|
||||||
return new OC_Archive_TAR($dir.'/data.tar.gz');
|
return new OC_Archive_TAR($dir.'/data.tar.gz');
|
||||||
|
@ -17,4 +18,7 @@ class Test_Archive_TAR extends Test_Archive{
|
||||||
protected function getNew(){
|
protected function getNew(){
|
||||||
return new OC_Archive_TAR(OC_Helper::tmpFile('.tar.gz'));
|
return new OC_Archive_TAR(OC_Helper::tmpFile('.tar.gz'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
abstract class Test_Archive_TAR extends Test_Archive{}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
require_once('archive.php');
|
require_once('archive.php');
|
||||||
|
|
||||||
class Test_Archive_ZIP extends Test_Archive{
|
if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){
|
||||||
|
class Test_Archive_ZIP extends Test_Archive{
|
||||||
protected function getExisting(){
|
protected function getExisting(){
|
||||||
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
|
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
|
||||||
return new OC_Archive_ZIP($dir.'/data.zip');
|
return new OC_Archive_ZIP($dir.'/data.zip');
|
||||||
|
@ -17,4 +18,7 @@ class Test_Archive_ZIP extends Test_Archive{
|
||||||
protected function getNew(){
|
protected function getNew(){
|
||||||
return new OC_Archive_ZIP(OC_Helper::tmpFile('.zip'));
|
return new OC_Archive_ZIP(OC_Helper::tmpFile('.zip'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
abstract class Test_Archive_ZIP extends Test_Archive{}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue