summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-07-19 16:19:23 +0200
committerRobin Appelman <icewind@owncloud.com>2012-07-19 16:19:23 +0200
commite031b9b88009ed7b1d1986d9a58e7cb39b5dd825 (patch)
treec3b07b538daeb7ae97a55c4a7b1f36ddb6e50452 /tests
parentb30da61d595a4efe4b35e5b05ca7fcd04732a28f (diff)
downloadnextcloud-server-e031b9b88009ed7b1d1986d9a58e7cb39b5dd825.tar.gz
nextcloud-server-e031b9b88009ed7b1d1986d9a58e7cb39b5dd825.zip
fix running test cases from browser
Diffstat (limited to 'tests')
-rw-r--r--tests/index.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/index.php b/tests/index.php
index 935ce39531a..0be27ee3fd7 100644
--- a/tests/index.php
+++ b/tests/index.php
@@ -32,8 +32,7 @@ $testSuiteName="ownCloud Unit Test Suite";
if(OC::$CLI){
$reporter=new TextReporter;
$test=isset($_SERVER['argv'][1])?$_SERVER['argv'][1]:false;
- if($test=='xml')
- {
+ if($test=='xml'){
$reporter= new XmlReporter;
$test=false;
@@ -42,7 +41,7 @@ if(OC::$CLI){
}
}
}else{
- $reporter='HtmlReporter';
+ $reporter=new HtmlReporter;
$test=isset($_GET['test'])?$_GET['test']:false;
}
@@ -81,10 +80,10 @@ function loadTests($dir,$testSuite, $test){
}elseif(substr($file,-4)=='.php' and $file!=__FILE__){
$name=getTestName($file);
if($test===false or $test==$name or substr($name,0,strlen($test))==$test){
- $extractor = new SimpleFileLoader();
+ $extractor = new SimpleFileLoader();
$loadedSuite=$extractor->load($file);
if ($loadedSuite->getSize() > 0)
- $testSuite->add($loadedSuite);
+ $testSuite->add($loadedSuite);
}
}
}