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'; require LIBS . 'cache.php';
Configure::getInstance(); Configure::getInstance();
$url = null; $url = null;
App::import('Core', 'Session'); App::import('Core', array('Session', 'Security', 'String', 'Dispatcher'));
App::import('Core', 'Security');
App::import('Core', 'String');
App::import('Core', 'Dispatcher');
?> ?>

View file

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

View file

@ -26,6 +26,9 @@
* @lastmodified $Date$ * @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @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_model.php';
require_once CAKE_TESTS_LIB . 'cake_test_fixture.php'; require_once CAKE_TESTS_LIB . 'cake_test_fixture.php';
!App::import('Vendor', 'simpletest' . DS . 'unit_tester'); !App::import('Vendor', 'simpletest' . DS . 'unit_tester');