diff --git a/cake/console/shells/bake.php b/cake/console/shells/bake.php index ce75dec10f0..77dd36201ce 100644 --- a/cake/console/shells/bake.php +++ b/cake/console/shells/bake.php @@ -162,8 +162,6 @@ public function all() { $modelBaked = $this->Model->bake($object, false); if ($modelBaked && $modelExists === false) { - $this->out(sprintf(__('%s Model was baked.'), $model)); - if ($this->_checkUnitTest()) { $this->Model->bakeFixture($model); $this->Model->bakeTest($model); @@ -173,7 +171,6 @@ public function all() { if ($modelExists === true) { $controller = $this->_controllerName($name); - $this->out(sprintf(__('Baking %s Controller...', 1), $controller)); if ($this->Controller->bake($controller, $this->Controller->bakeActions($controller))) { if ($this->_checkUnitTest()) { $this->Controller->bakeTest($controller); @@ -182,9 +179,9 @@ public function all() { if (App::import('Controller', $controller)) { $this->View->args = array($controller); $this->View->execute(); - $this->out(sprintf(__('%s Views were baked.'), $controller)); } - $this->out(__('Bake All complete')); + $this->out('', 1, Shell::QUIET); + $this->out(__('Bake All complete'), 1, Shell::QUIET); array_shift($this->args); } else { $this->error(__('Bake All could not continue without a valid model')); diff --git a/cake/console/shells/tasks/controller.php b/cake/console/shells/tasks/controller.php index e88dc2059d8..f56f55d3be7 100644 --- a/cake/console/shells/tasks/controller.php +++ b/cake/console/shells/tasks/controller.php @@ -302,6 +302,8 @@ public function bakeActions($controllerName, $admin = null, $wannaUseSession = t * @return string Baked controller */ public function bake($controllerName, $actions = '', $helpers = null, $components = null) { + $this->out("\nBaking controller class for $controllerName...", 1, Shell::QUIET); + $isScaffold = ($actions === 'scaffold') ? true : false; $this->Template->set('plugin', Inflector::camelize($this->plugin)); diff --git a/cake/console/shells/tasks/fixture.php b/cake/console/shells/tasks/fixture.php index 1313ab1dd10..3333591212c 100644 --- a/cake/console/shells/tasks/fixture.php +++ b/cake/console/shells/tasks/fixture.php @@ -254,7 +254,7 @@ public function generateFixtureFile($model, $otherVars) { $this->Template->set($vars); $content = $this->Template->generate('classes', 'fixture'); - $this->out("\nBaking test fixture for $model..."); + $this->out("\nBaking test fixture for $model...", 1, Shell::QUIET); $this->createFile($path . $filename, $content); return $content; } diff --git a/cake/console/shells/tasks/model.php b/cake/console/shells/tasks/model.php index 7e8de3e360f..6abd25344fa 100644 --- a/cake/console/shells/tasks/model.php +++ b/cake/console/shells/tasks/model.php @@ -742,7 +742,7 @@ public function bake($name, $data = array()) { $path = $this->getPath(); $filename = $path . Inflector::underscore($name) . '.php'; - $this->out("\nBaking model class for $name..."); + $this->out("\nBaking model class for $name...", 1, Shell::QUIET); $this->createFile($filename, $out); ClassRegistry::flush(); return $out; diff --git a/cake/console/shells/tasks/test.php b/cake/console/shells/tasks/test.php index bb277bbcc08..173a650796a 100644 --- a/cake/console/shells/tasks/test.php +++ b/cake/console/shells/tasks/test.php @@ -115,7 +115,7 @@ protected function _interactive($type = null) { */ public function bake($type, $className) { if ($this->typeCanDetectFixtures($type) && $this->isLoadableClass($type, $className)) { - $this->out(__('Bake is detecting possible fixtures..')); + $this->out(__('Bake is detecting possible fixtures...')); $testSubject = $this->buildTestSubject($type, $className); $this->generateFixtureList($testSubject); } elseif ($this->interactive) { @@ -134,6 +134,7 @@ public function bake($type, $className) { if ($this->plugin) { $plugin = $this->plugin . '.'; } + $this->out("\nBaking test case for $className $type...", 1, Shell::QUIET); $this->Template->set('fixtures', $this->_fixtures); $this->Template->set('plugin', $plugin); diff --git a/cake/console/shells/tasks/view.php b/cake/console/shells/tasks/view.php index 2acbfdeaa80..14d67b7fe24 100644 --- a/cake/console/shells/tasks/view.php +++ b/cake/console/shells/tasks/view.php @@ -366,6 +366,7 @@ public function bake($action, $content = '') { if (empty($content)) { return false; } + $this->out("\nBaking `$action` view file...", 1, Shell::QUIET); $path = $this->getPath(); $filename = $path . $this->controllerPath . DS . Inflector::underscore($action) . '.ctp'; return $this->createFile($filename, $content); diff --git a/cake/tests/cases/console/shells/tasks/controller.test.php b/cake/tests/cases/console/shells/tasks/controller.test.php index 61d00b4f195..f3601376e7a 100644 --- a/cake/tests/cases/console/shells/tasks/controller.test.php +++ b/cake/tests/cases/console/shells/tasks/controller.test.php @@ -304,11 +304,11 @@ public function testBakeWithPlugin() { $path = APP . 'plugins' . DS . 'controller_test' . DS . 'controllers' . DS . 'articles_controller.php'; - $this->Task->expects($this->at(0))->method('createFile')->with( + $this->Task->expects($this->at(1))->method('createFile')->with( $path, new PHPUnit_Framework_Constraint_IsAnything() ); - $this->Task->expects($this->at(1))->method('createFile')->with( + $this->Task->expects($this->at(3))->method('createFile')->with( $path, new PHPUnit_Framework_Constraint_PCREMatch('/ArticlesController extends ControllerTestAppController/') );