From 77198abd94437eb418f11957695986470b1afc9a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 May 2015 14:45:53 +0200 Subject: tests: Make prove --state work; Restructure tests This moves all tests into a subdirectory and lets prove itself figure out which tests exist. It seems if you supply the testlist via arguments or stdin --state won't affect the order. Signed-off-by: Florian Pritz --- application/controllers/tools.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'application/controllers/tools.php') diff --git a/application/controllers/tools.php b/application/controllers/tools.php index d1d5ba39b..d38ab7c39 100644 --- a/application/controllers/tools.php +++ b/application/controllers/tools.php @@ -70,8 +70,11 @@ class Tools extends MY_Controller { $url = $argv[3]; $testcase = $argv[4]; - $testclass = '\tests\\'.$testcase; - $test = new $testclass(); + $testcase = str_replace("application/", "", $testcase); + $testcase = str_replace("/", "\\", $testcase); + $testcase = str_replace(".php", "", $testcase); + + $test = new $testcase(); $test->setServer($url); $exitcode = 0; -- cgit v1.2.3-24-g4f1b