Skip to content

Commit

Permalink
Allowing the running of all core test cases via the console
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Aug 2, 2009
1 parent 982f161 commit 60154b6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions cake/console/libs/testsuite.php
Expand Up @@ -235,8 +235,9 @@ function __canRun() {
if ($this->category == 'app' && file_exists($folder.DS.'cases'.DS.$this->file.'.test.php')) {
return true;
}

if ($this->category == 'core' && file_exists($folder.DS.'cases'.DS.'libs'.DS.$this->file.'.test.php')) {
$coreCaseExists = file_exists($folder.DS.'cases'.DS.$this->file.'.test.php');
$coreLibCaseExists = file_exists($folder.DS.'cases'.DS.'libs'.DS.$this->file.'.test.php');
if ($this->category == 'core' && ($coreCaseExists || $coreLibCaseExists)) {
return true;
}

Expand Down Expand Up @@ -291,9 +292,14 @@ function __run() {
}
return $result;
}

$case = 'libs'.DS.$this->file.'.test.php';
if ($this->category == 'app') {
if ($this->category === 'core') {
$coreCaseExists = file_exists(CORE_TEST_CASES.DS.$this->file.'.test.php');
if ($coreCaseExists) {
$case = $this->file . '.test.php';
} else {
$case = 'libs' . DS . $this->file . '.test.php';
}
} elseif ($this->category === 'app') {
$case = $this->file.'.test.php';
} elseif ($this->isPluginTest) {
$case = $this->file.'.test.php';
Expand Down

0 comments on commit 60154b6

Please sign in to comment.