Fix View task missing 'app' param when baking custom action.

This commit is contained in:
Majna 2011-11-05 19:54:21 +01:00
parent cd81f9c30a
commit 3374406bbf
2 changed files with 1 additions and 2 deletions

View file

@ -327,7 +327,7 @@ class ViewTask extends BakeTask {
$this->hr();
$this->out(__d('cake_console', 'Controller Name: %s', $this->controllerName));
$this->out(__d('cake_console', 'Action Name: %s', $action));
$this->out(__d('cake_console', 'Path: %s', $this->params['app'] . DS . 'View' . DS . $this->controllerName . DS . Inflector::underscore($action) . ".ctp"));
$this->out(__d('cake_console', 'Path: %s', $this->getPath() . $this->controllerName . DS . Inflector::underscore($action) . ".ctp"));
$this->hr();
$looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y');
if (strtolower($looksGood) == 'y') {

View file

@ -431,7 +431,6 @@ class ViewTaskTest extends CakeTestCase {
*/
public function testCustomAction() {
$this->Task->controllerName = 'ViewTaskComments';
$this->Task->params['app'] = APP;
$this->Task->expects($this->any())->method('in')
->will($this->onConsecutiveCalls('', 'my_action', 'y'));