some clean up related to testsuite shell

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6741 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-05-01 05:39:36 +00:00
parent 48f0131d50
commit 7ab5c20577
3 changed files with 12 additions and 12 deletions

View file

@ -44,10 +44,8 @@ if (!defined('PHP5')) {
require LIBS . 'cache.php';
Configure::getInstance();
$url = null;
App::import('Core', 'Session');
App::import('Core', 'Security');
App::import('Core', 'String');
App::import('Core', 'Dispatcher');
App::import('Core', array('Session', 'Security', 'String', 'Dispatcher'));
?>

View file

@ -1,9 +1,9 @@
<?php
/* SVN FILE: $Id: testsuite.php 6730 2008-04-23 18:25:03Z DarkAngelBGE $ */
/**
* Test Suite Shell
* Test Suite Shell
*
* This Shell allows the running of test suites via the cake command line
* This Shell allows the running of test suites via the cake command line
*
* PHP versions 4 and 5
*
@ -25,7 +25,7 @@
* @modifiedby $LastChangedBy: DarkAngelBGE $
* @lastmodified $Date: 2008-04-23 20:25:03 +0200 (Wed, 23 Apr 2008) $
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
*/
class TestSuiteShell extends Shell {
/**
* The test category, "app", "core" or the name of a plugin
@ -92,7 +92,6 @@ class TestSuiteShell extends Shell {
$this->__installSimpleTest();
require_once CAKE . 'dispatcher.php';
require_once CAKE . 'tests' . DS . 'lib' . DS . 'test_manager.php';
require_once CAKE . 'tests' . DS . 'lib' . DS . 'cli_reporter.php';
@ -129,7 +128,7 @@ class TestSuiteShell extends Shell {
$this->file = Inflector::underscore($this->args[2]);
}
}
if (isset($this->args[3]) && $this->args[3] == 'cov') {
$this->doCoverage = true;
}
@ -247,7 +246,7 @@ class TestSuiteShell extends Shell {
if ($this->type == 'all') {
return TestManager::runAllTests($reporter);
}
if ($this->type == 'group') {
$ucFirstGroup = ucfirst($this->file);
@ -263,9 +262,9 @@ class TestSuiteShell extends Shell {
$case = 'libs'.DS.$this->file.'.test.php';
if ($this->category == 'app') {
$case = $this->file.'.test.php';
$case = $this->file.'.test.php';
} elseif ($this->isPluginTest) {
$case = $this->file.'.test.php';
$case = $this->file.'.test.php';
}
if ($this->doCoverage) {

View file

@ -26,6 +26,9 @@
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
if (!class_exists('dispatcher')) {
require CAKE . 'dispatcher.php';
}
require_once CAKE_TESTS_LIB . 'cake_test_model.php';
require_once CAKE_TESTS_LIB . 'cake_test_fixture.php';
!App::import('Vendor', 'simpletest' . DS . 'unit_tester');