diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/controllers/tools.php | 7 | ||||
-rw-r--r-- | application/test/Test.php (renamed from application/tests/Test.php) | 2 | ||||
-rw-r--r-- | application/test/tests/test_api_v1.php (renamed from application/tests/test_api_v1.php) | 4 | ||||
-rw-r--r-- | application/test/tests/test_libraries_image.php (renamed from application/tests/test_libraries_image.php) | 4 | ||||
-rw-r--r-- | application/test/tests/test_libraries_pygments.php (renamed from application/tests/test_libraries_pygments.php) | 4 | ||||
-rw-r--r-- | application/test/tests/test_service_files.php (renamed from application/tests/test_service_files.php) | 4 | ||||
-rw-r--r-- | application/test/tests/test_service_files_valid_id.php (renamed from application/tests/test_service_files_valid_id.php) | 4 |
7 files changed, 16 insertions, 13 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; diff --git a/application/tests/Test.php b/application/test/Test.php index c11cd0cc4..925fe131e 100644 --- a/application/tests/Test.php +++ b/application/test/Test.php @@ -7,7 +7,7 @@ * */ -namespace tests; +namespace test; require_once APPPATH."/third_party/test-more-php/Test-More-OO.php"; diff --git a/application/tests/test_api_v1.php b/application/test/tests/test_api_v1.php index 378f741de..cdac30544 100644 --- a/application/tests/test_api_v1.php +++ b/application/test/tests/test_api_v1.php @@ -7,9 +7,9 @@ * */ -namespace tests; +namespace test\tests; -class test_api_v1 extends Test { +class test_api_v1 extends \test\Test { public function __construct() { diff --git a/application/tests/test_libraries_image.php b/application/test/tests/test_libraries_image.php index fb34d794e..13c9e67b9 100644 --- a/application/tests/test_libraries_image.php +++ b/application/test/tests/test_libraries_image.php @@ -7,9 +7,9 @@ * */ -namespace tests; +namespace test\tests; -class test_libraries_image extends Test { +class test_libraries_image extends \test\Test { public function __construct() { diff --git a/application/tests/test_libraries_pygments.php b/application/test/tests/test_libraries_pygments.php index f88a4bcbd..768bca439 100644 --- a/application/tests/test_libraries_pygments.php +++ b/application/test/tests/test_libraries_pygments.php @@ -7,9 +7,9 @@ * */ -namespace tests; +namespace test\tests; -class test_libraries_pygments extends Test { +class test_libraries_pygments extends \test\Test { public function __construct() { diff --git a/application/tests/test_service_files.php b/application/test/tests/test_service_files.php index 8789a9888..21688230f 100644 --- a/application/tests/test_service_files.php +++ b/application/test/tests/test_service_files.php @@ -7,9 +7,9 @@ * */ -namespace tests; +namespace test\tests; -class test_service_files extends Test { +class test_service_files extends \test\Test { public function __construct() { diff --git a/application/tests/test_service_files_valid_id.php b/application/test/tests/test_service_files_valid_id.php index c090dcbd9..24886be43 100644 --- a/application/tests/test_service_files_valid_id.php +++ b/application/test/tests/test_service_files_valid_id.php @@ -7,9 +7,9 @@ * */ -namespace tests; +namespace test\tests; -class test_service_files_valid_id extends Test { +class test_service_files_valid_id extends \test\Test { private $model; private $filedata; private $config; |