Skip to content
Browse files

allow running all core test cases via the console

  • Loading branch information...
1 parent 61022f4 commit 86e5cc5a89e7307ebf827c688311cdbe945feb85 @AD7six AD7six committed
Showing with 13 additions and 4 deletions.
  1. +13 −4 cake/console/libs/testsuite.php
View
17 cake/console/libs/testsuite.php
@@ -94,7 +94,7 @@ function initialize() {
if (isset($corePath[0])) {
define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS);
} else {
- define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH);
+ define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS);
}
$this->__installSimpleTest();
@@ -236,8 +236,13 @@ function __canRun() {
return true;
}
- if ($this->category == 'core' && file_exists($folder.DS.'cases'.DS.'libs'.DS.$this->file.'.test.php')) {
- return true;
+ if ($this->category == 'core') {
+ if (file_exists($folder.DS.'cases'.DS.$this->file.'.test.php')) {
+ return true;
+ }
+ if (file_exists($folder.DS.'cases'.DS.'libs'.DS.$this->file.'.test.php')) {
+ return true;
+ }
}
if ($isPlugin && file_exists($folder.DS.'cases'.DS.$this->file.'.test.php')) {
@@ -292,7 +297,11 @@ function __run() {
return $result;
}
- $case = 'libs'.DS.$this->file.'.test.php';
+ if (file_exists(CORE_TEST_CASES . DS . $this->file . '.test.php')) {
+ $case = $this->file . '.test.php';
+ } else {
+ $case = 'libs' . DS . $this->file . '.test.php';
+ }
if ($this->category == 'app') {
$case = $this->file.'.test.php';
} elseif ($this->isPluginTest) {

0 comments on commit 86e5cc5

Please sign in to comment.
Something went wrong with that request. Please try again.