Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make App test cases the default.

Fixes #2372
  • Loading branch information...
commit c8fd7c090b8071b89e05b451f2476e0870c3a204 1 parent c272a8b
@markstory markstory authored
View
4 lib/Cake/TestSuite/CakeTestLoader.php
@@ -61,8 +61,6 @@ protected static function _basePath($params) {
$result = null;
if (!empty($params['core'])) {
$result = CORE_TEST_CASES;
- } elseif (!empty($params['app'])) {
- $result = APP_TEST_CASES;
} else if (!empty($params['plugin'])) {
if (!CakePlugin::loaded($params['plugin'])) {
try {
@@ -72,6 +70,8 @@ protected static function _basePath($params) {
} else {
$result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
}
+ } elseif (!empty($params['app'])) {
+ $result = APP_TEST_CASES;
}
return $result;
}
View
6 lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
@@ -37,7 +37,7 @@ class CakeTestSuiteDispatcher {
'codeCoverage' => false,
'case' => null,
'core' => false,
- 'app' => false,
+ 'app' => true,
'plugin' => null,
'output' => 'html',
'show' => 'groups',
@@ -214,8 +214,8 @@ function _parseParams() {
$this->_checkXdebug();
}
}
- if (empty($this->params['plugin']) && empty($this->params['app'])) {
- $this->params['core'] = true;
+ if (empty($this->params['plugin']) && empty($this->params['core'])) {
+ $this->params['app'] = true;
}
$this->params['baseUrl'] = $this->_baseUrl;
$this->params['baseDir'] = $this->_baseDir;
View
2  lib/Cake/TestSuite/Reporter/CakeBaseReporter.php
@@ -53,7 +53,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
*
* - show_passes - Should passes be shown
* - plugin - Plugin test being run?
- * - app - App test being run.
+ * - core - Core test being run.
* - case - The case being run
* - codeCoverage - Whether the case/group being run is being code covered.
*
View
14 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
@@ -70,14 +70,14 @@ public function paintTestMenu() {
*/
public function testCaseList() {
$testCases = parent::testCaseList();
- $app = $this->params['app'];
+ $core = $this->params['core'];
$plugin = $this->params['plugin'];
- $buffer = "<h3>Core Test Cases:</h3>\n<ul>";
+ $buffer = "<h3>App Test Cases:</h3>\n<ul>";
$urlExtra = null;
- if ($app) {
- $buffer = "<h3>App Test Cases:</h3>\n<ul>";
- $urlExtra = '&app=true';
+ if ($core) {
+ $buffer = "<h3>Core Test Cases:</h3>\n<ul>";
+ $urlExtra = '&core=true';
} elseif ($plugin) {
$buffer = "<h3>" . Inflector::humanize($plugin) . " Test Cases:</h3>\n<ul>";
$urlExtra = '&plugin=' . $plugin;
@@ -177,8 +177,8 @@ protected function _paintLinks() {
$show['show'] = 'cases';
}
- if (!empty($this->params['app'])) {
- $show['app'] = $query['app'] = 'true';
+ if (!empty($this->params['core'])) {
+ $show['core'] = $query['core'] = 'true';
}
if (!empty($this->params['plugin'])) {
$show['plugin'] = $query['plugin'] = $this->params['plugin'];
View
6 lib/Cake/TestSuite/templates/menu.php
@@ -22,7 +22,7 @@
<li>
<span style="font-size: 18px">App</span>
<ul>
- <li><a href='<?php echo $cases;?>&amp;app=true'>Tests</a></li>
+ <li><a href='<?php echo $cases;?>'>Tests</a></li>
</ul>
</li>
<?php
@@ -45,9 +45,9 @@
<li style="padding-top: 10px">
<span style="font-size: 18px">Core</span>
<ul>
- <li><a href='<?php echo $cases;?>'>Tests</a></li>
+ <li><a href='<?php echo $cases;?>&amp;core=true'>Tests</a></li>
</ul>
</li>
</ul>
</div>
-<div class="test-results">
+<div class="test-results">
Please sign in to comment.
Something went wrong with that request. Please try again.