mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '2.0' of github.com:cakephp/cakephp into 2.0
This commit is contained in:
commit
2878614ca4
3 changed files with 15 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue