Upgrade CakePHP from 2.2.5 to 2.9.5

This commit is contained in:
Brm Ko 2017-02-26 15:29:44 +01:00
parent 5a580df460
commit 235a541597
793 changed files with 60746 additions and 23753 deletions

View file

@ -2,19 +2,19 @@
/**
* CakeTextReporter contains reporting features used for plain text based output
*
* PHP 5
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice
*
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
App::uses('CakeBaseReporter', 'TestSuite/Reporter');
App::uses('TextCoverageReport', 'TestSuite/Coverage');
@ -48,7 +48,7 @@ class CakeTextReporter extends CakeBaseReporter {
/**
* Paints a failing test.
*
* @param $message PHPUnit_Framework_AssertionFailedError $message Failure object displayed in
* @param PHPUnit_Framework_AssertionFailedError $message Failure object displayed in
* the context of the other tests.
* @return void
*/
@ -71,10 +71,10 @@ class CakeTextReporter extends CakeBaseReporter {
* @return void
*/
public function paintFooter($result) {
if ($result->failureCount() + $result->errorCount() == 0) {
echo "\nOK\n";
} else {
if ($result->failureCount() + $result->errorCount()) {
echo "FAILURES!!!\n";
} else {
echo "\nOK\n";
}
echo "Test cases run: " . $result->count() .
@ -95,7 +95,6 @@ class CakeTextReporter extends CakeBaseReporter {
/**
* Paints the title only.
*
* @param string $test_name Name class of test.
* @return void
*/
public function paintHeader() {
@ -140,7 +139,7 @@ class CakeTextReporter extends CakeBaseReporter {
/**
* Generate a test case list in plain text.
* Creates as series of url's for tests that can be run.
* Creates as series of URLs for tests that can be run.
* One case per line.
*
* @return void
@ -151,21 +150,18 @@ class CakeTextReporter extends CakeBaseReporter {
$plugin = $this->params['plugin'];
$buffer = "Core Test Cases:\n";
$urlExtra = '';
if ($app) {
$buffer = "App Test Cases:\n";
$urlExtra = '&app=true';
} elseif ($plugin) {
$buffer = Inflector::humanize($plugin) . " Test Cases:\n";
$urlExtra = '&plugin=' . $plugin;
}
if (1 > count($testCases)) {
$buffer .= "EMPTY";
if (count($testCases) < 1) {
$buffer .= 'EMPTY';
echo $buffer;
}
foreach ($testCases as $testCaseFile => $testCase) {
foreach ($testCases as $testCase) {
$buffer .= $_SERVER['SERVER_NAME'] . $this->baseUrl() . "?case=" . $testCase . "&output=text\n";
}
@ -177,7 +173,7 @@ class CakeTextReporter extends CakeBaseReporter {
* Generates a Text summary of the coverage data.
*
* @param array $coverage Array of coverage data.
* @return string
* @return void
*/
public function paintCoverage($coverage) {
$reporter = new TextCoverageReport($coverage, $this);