Merge pull request #299 from majna/2.0-view-task

Fix View task missing 'app' param when baking custom action.
This commit is contained in:
Mark Story 2011-11-05 13:03:53 -07:00
commit 05df15cdd3
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'));