diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-05-21 14:45:53 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-21 18:43:13 +0200 |
commit | 77198abd94437eb418f11957695986470b1afc9a (patch) | |
tree | 710b0285a00aa3f54db274ff01a9eb21017c2164 /application/controllers/tools.php | |
parent | eb9daf07b1a118b473d352c98c5822c3063e598d (diff) |
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 <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/tools.php')
-rw-r--r-- | application/controllers/tools.php | 7 |
1 files changed, 5 insertions, 2 deletions
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; |