Fix bad xml help generation.

Fixes #2619
This commit is contained in:
mark_story 2012-02-26 10:21:04 -05:00
parent 2840dc74d3
commit 2a9a103d62
3 changed files with 7 additions and 14 deletions

View file

@ -47,11 +47,11 @@ class ConsoleShell extends AppShell {
public $models = array(); public $models = array();
/** /**
* Override initialize of the Shell * Override startup of the Shell
* *
* @return void * @return void
*/ */
public function initialize() { public function startup() {
App::uses('Dispatcher', 'Routing'); App::uses('Dispatcher', 'Routing');
$this->Dispatcher = new Dispatcher(); $this->Dispatcher = new Dispatcher();
$this->models = App::objects('Model'); $this->models = App::objects('Model');

View file

@ -49,23 +49,16 @@ class SchemaShell extends AppShell {
*/ */
protected $_dry = null; protected $_dry = null;
/**
* Override initialize
*
* @return string
*/
public function initialize() {
$this->_welcome();
$this->out('Cake Schema Shell');
$this->hr();
}
/** /**
* Override startup * Override startup
* *
* @return void * @return void
*/ */
public function startup() { public function startup() {
$this->_welcome();
$this->out('Cake Schema Shell');
$this->hr();
$name = $path = $connection = $plugin = null; $name = $path = $connection = $plugin = null;
if (!empty($this->params['name'])) { if (!empty($this->params['name'])) {
$name = $this->params['name']; $name = $this->params['name'];

View file

@ -188,7 +188,7 @@ class SchemaShellTest extends CakeTestCase {
$this->Shell->args = array('TestPlugin.schema'); $this->Shell->args = array('TestPlugin.schema');
$this->Shell->startup(); $this->Shell->startup();
$this->Shell->expects($this->exactly(2))->method('_stop'); $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->view();
$this->Shell->args = array(); $this->Shell->args = array();