small fix in filesystem test

This commit is contained in:
Robin Appelman 2011-06-14 01:22:58 +02:00
parent f6eb7c1205
commit 141ffbb1f5
2 changed files with 3 additions and 4 deletions

View File

@ -30,7 +30,7 @@ require_once('testcase.php');
require_once('template.php');
$testCases=loadFiles(__DIR__,array('index.php','templates'));
ob_end_clean();
$testResults=array();
foreach($testCases as $testCaseClass){
$testCase=new $testCaseClass();
@ -65,10 +65,10 @@ function loadFiles($path,$exclude=false){
$dh=opendir($path);
while($file=readdir($dh)){
if($file!='.' && $file!='..' && array_search($file,$exclude)===false){
if(is_file($path.'/'.$file)){
if(is_file($path.'/'.$file) and substr($file,-3)=='php'){
$result=require_once($path.'/'.$file);
$results[]=$result;
}else{
}elseif(is_dir($path.'/'.$file)){
$subResults=loadFiles($path.'/'.$file);
$results=array_merge($results,$subResults);
}

View File

@ -84,7 +84,6 @@ class OC_FILEYSYSTEM_Test extends OC_TestCase
public function readfile(){
OC_FILESYSTEM::file_put_contents('/dummy','foo');
ob_clean();
ob_start();
OC_FILESYSTEM::readfile('/dummy');
$this->assertEquals('foo', ob_get_contents(),'Unexpected output of readfile');