Merge branch '2.0' of github.com:cakephp/cakephp into 2.0

This commit is contained in:
Jose Lorenzo Rodriguez 2011-04-22 16:10:06 -04:30
commit 3c4f616737
4 changed files with 95 additions and 10 deletions

View file

@ -165,7 +165,7 @@ class Shell extends Object {
if ($this->stdin == null) {
$this->stdin = new ConsoleInput('php://stdin');
}
$parent = get_parent_class($this);
if ($this->tasks !== null && $this->tasks !== false) {
$this->_mergeVars(array('tasks'), $parent, true);
@ -200,7 +200,6 @@ class Shell extends Object {
*
*/
protected function _welcome() {
$this->clear();
$this->out();
$this->out('<info>Welcome to CakePHP v' . Configure::version() . ' Console</info>');
$this->hr();
@ -296,16 +295,16 @@ class Shell extends Object {
* but intended for running shells from other shells.
*
* ### Usage:
*
*
* With a string commmand:
*
* `return $this->dispatchShell('schema create DbAcl');`
*
* With an array command:
*
* `return $this->dispatchShell('schema', 'create', 'i18n', '--dry');`
* `return $this->dispatchShell('schema', 'create', 'i18n', '--dry');`
*
* @param mixed $command Either an array of args similar to $argv. Or a string command, that can be
* @param mixed $command Either an array of args similar to $argv. Or a string command, that can be
* exploded on space to simulate argv.
* @return mixed. The return of the other shell.
*/
@ -471,7 +470,7 @@ class Shell extends Object {
/**
* Wrap a block of text.
* Allows you to set the width, and indenting on a block of text.
* Allows you to set the width, and indenting on a block of text.
*
* ### Options
*
@ -480,7 +479,7 @@ class Shell extends Object {
* - `indent` Indent the text with the string provided. Defaults to null.
*
* @param string $text Text the text to format.
* @param mixed $options Array of options to use, or an integer to wrap the text to.
* @param mixed $options Array of options to use, or an integer to wrap the text to.
* @return string Wrapped / indented text
* @see String::wrap()
*/

View file

@ -22,8 +22,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
/**
* Load a file and find the first test case / suite in that file.
*
* @param string $filePath
* @param string $params
* @param string $filePath
* @param string $params
* @return ReflectionClass
*/
public function load($filePath, $params = '') {
@ -45,7 +45,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
/**
* Generates the base path to a set of tests based on the parameters.
*
* @param array $params
* @param array $params
* @return string The base path.
*/
protected static function _basePath($params) {
@ -76,6 +76,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
$case = str_replace('Test.php', '', $case);
$testCases[$testCaseFile] = $case;
}
sort($testCases);
return $testCases;
}

View file

@ -0,0 +1,41 @@
<?php
/**
* AllCoreTest file
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.tests.cases
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* AllCoreTest class
*
* This test group will run all core class tests
*
* @package cake.tests.groups
*/
class AllCoreTest extends PHPUnit_Framework_TestSuite {
/**
* suite method, defines tests for this suite.
*
* @return void
*/
public static function suite() {
$suite = new CakeTestSuite('All Core class tests');
$suite->addTestDirectory(CORE_TEST_CASES . DS . 'Core');
return $suite;
}
}

View file

@ -0,0 +1,44 @@
<?php
/**
* AllConsoleTest file
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.tests.cases
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* AllConsoleTest class
*
* This test group will run all console classes.
*
* @package cake.tests.cases.console
*/
class AllConsoleTest extends PHPUnit_Framework_TestSuite {
/**
* suite method, defines tests for this suite.
*
* @return void
*/
public static function suite() {
$suite = new CakeTestSuite('All console classes');
$path = CORE_TEST_CASES . DS . 'Console' . DS;
$suite->addTestFile($path . 'AllConsoleLibsTest.php');
$suite->addTestFile($path . 'AllTasksTest.php');
$suite->addTestFile($path . 'AllShellsTest.php');
return $suite;
}
}