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

This commit is contained in:
Renan Gonçalves 2011-05-29 14:01:51 +02:00
commit 2878614ca4
3 changed files with 15 additions and 2 deletions

View file

@ -467,7 +467,7 @@ class TestTask extends BakeTask {
public function getPath() {
$path = $this->path;
if (isset($this->plugin)) {
$path = $this->_pluginPath($this->plugin) . 'tests' . DS;
$path = $this->_pluginPath($this->plugin) . 'Test' . DS;
}
return $path;
}

View file

@ -149,7 +149,7 @@ class Shell extends Object {
*/
function __construct($stdout = null, $stderr = null, $stdin = null) {
if ($this->name == null) {
$this->name = Inflector::underscore(str_replace(array('Shell', 'Task'), '', get_class($this)));
$this->name = Inflector::camelize(str_replace(array('Shell', 'Task'), '', get_class($this)));
}
$this->Tasks = new TaskCollection($this);

View file

@ -800,4 +800,17 @@ TEXT;
TEXT;
$this->assertEquals($expected, $result, 'Text not wrapped.');
}
/**
* Testing camel cased naming of tasks
*
* @access public
* @return void
*/
public function testShellNaming() {
$this->Shell->tasks = array('TestApple');
$this->Shell->loadTasks();
$expected = 'TestApple';
$this->assertEqual($expected, $this->Shell->TestApple->name);
}
}