mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 02:52:41 +00:00
parent
c272a8b3ca
commit
c8fd7c090b
5 changed files with 16 additions and 16 deletions
|
@ -61,8 +61,6 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
$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 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
} else {
|
||||
$result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
|
||||
}
|
||||
} elseif (!empty($params['app'])) {
|
||||
$result = APP_TEST_CASES;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
|
|
@ -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 @@ class CakeTestSuiteDispatcher {
|
|||
$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;
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -70,14 +70,14 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
*/
|
||||
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 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
$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'];
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<li>
|
||||
<span style="font-size: 18px">App</span>
|
||||
<ul>
|
||||
<li><a href='<?php echo $cases;?>&app=true'>Tests</a></li>
|
||||
<li><a href='<?php echo $cases;?>'>Tests</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -45,9 +45,9 @@ if (!empty($plugins)):
|
|||
<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;?>&core=true'>Tests</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="test-results">
|
||||
<div class="test-results">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue