From 2a9a103d62d0a4ea8520882ba68ad01367ab99e3 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 26 Feb 2012 10:21:04 -0500 Subject: [PATCH] Fix bad xml help generation. Fixes #2619 --- lib/Cake/Console/Command/ConsoleShell.php | 4 ++-- lib/Cake/Console/Command/SchemaShell.php | 15 ++++----------- .../Test/Case/Console/Command/SchemaShellTest.php | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php index 328fbf5ea..1f0981d3c 100644 --- a/lib/Cake/Console/Command/ConsoleShell.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -47,11 +47,11 @@ class ConsoleShell extends AppShell { public $models = array(); /** - * Override initialize of the Shell + * Override startup of the Shell * * @return void */ - public function initialize() { + public function startup() { App::uses('Dispatcher', 'Routing'); $this->Dispatcher = new Dispatcher(); $this->models = App::objects('Model'); diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 8fe7a76b1..a1a6b4482 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -49,23 +49,16 @@ class SchemaShell extends AppShell { */ protected $_dry = null; -/** - * Override initialize - * - * @return string - */ - public function initialize() { - $this->_welcome(); - $this->out('Cake Schema Shell'); - $this->hr(); - } - /** * Override startup * * @return void */ public function startup() { + $this->_welcome(); + $this->out('Cake Schema Shell'); + $this->hr(); + $name = $path = $connection = $plugin = null; if (!empty($this->params['name'])) { $name = $this->params['name']; diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index c8c2572d7..82655981a 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -188,7 +188,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->args = array('TestPlugin.schema'); $this->Shell->startup(); $this->Shell->expects($this->exactly(2))->method('_stop'); - $this->Shell->expects($this->exactly(2))->method('out'); + $this->Shell->expects($this->atLeastOnce())->method('out'); $this->Shell->view(); $this->Shell->args = array();