Permalink
Browse files

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

  • Loading branch information...
2 parents c9a6905 + c5a2efc commit 2878614ca4d46a2bad52f608ed4ac7d2d4ea16a9 @renan renan committed May 29, 2011
View
2 lib/Cake/Console/Command/Task/TestTask.php
@@ -467,7 +467,7 @@ public function getOptionParser() {
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
2 lib/Cake/Console/Shell.php
@@ -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
13 lib/Cake/Test/Case/Console/Command/ShellTest.php
@@ -800,4 +800,17 @@ function testWrapText() {
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);
+ }
}

0 comments on commit 2878614

Please sign in to comment.