From 689c7ffd45a538a638959ce5eafb5cbc4874e2e5 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sun, 21 Aug 2011 01:04:55 -0400 Subject: [PATCH] Fixed some problems caused by the visibility changes. --- lib/Cake/Console/Command/SchemaShell.php | 7 +++++++ lib/Cake/Controller/Component/RequestHandlerComponent.php | 4 ++-- lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php | 6 +++--- lib/Cake/View/Helper/FormHelper.php | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 3e0cfca5db0..89bead3cf4d 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -37,6 +37,13 @@ class SchemaShell extends Shell { */ public $Schema; +/** + * is this a dry run? + * + * @var boolean + */ + protected $_dry = null; + /** * Override initialize * diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index 62aad169465..ffe58582e08 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -91,7 +91,7 @@ class RequestHandlerComponent extends Component { * @param array $settings Array of settings. */ public function __construct(ComponentCollection $collection, $settings = array()) { - $this->addInputType('xml', array(array($this, '_convertXml'))); + $this->addInputType('xml', array(array($this, 'convertXml'))); parent::__construct($collection, $settings); } @@ -175,7 +175,7 @@ public function startup($controller) { * @param string $xml * @return array Xml array data */ - protected function _convertXml($xml) { + public function convertXml($xml) { try { $xml = Xml::build($xml); if (isset($xml->data)) { diff --git a/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php b/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php index 8a11a41a0e5..5db68501522 100644 --- a/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php @@ -34,7 +34,7 @@ public function setUp() { $this->Shell = $this->getMock( 'TestsuiteShell', - array('in', 'out', 'hr', 'help', 'error', 'err', '_stop', 'initialize', 'run', 'clear'), + array('in', 'out', 'hr', 'help', 'error', 'err', '_stop', 'initialize', '_run', 'clear'), array($out, $out, $in) ); $this->Shell->OptionParser = $this->getMock('ConsoleOptionParser', array(), array(null, false)); @@ -80,7 +80,7 @@ public function testAvailableCoreCategory() { ->with(__d('cake_console', 'What test case would you like to run?'), null, 'q') ->will($this->returnValue('1')); - $this->Shell->expects($this->once())->method('run'); + $this->Shell->expects($this->once())->method('_run'); $this->Shell->available(); $this->assertEquals($this->Shell->args, array('core', 'AllBehaviors')); } @@ -95,7 +95,7 @@ public function testRunnerOptions() { $this->Shell->args = array('core', 'Basics'); $this->Shell->params = array('filter' => 'myFilter', 'colors' => true, 'verbose' => true); - $this->Shell->expects($this->once())->method('run') + $this->Shell->expects($this->once())->method('_run') ->with( array('app' => false, 'plugin' => null, 'core' => true, 'output' => 'text', 'case' => 'Basics'), array('--filter', 'myFilter', '--colors', '--verbose') diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 8832ac83f50..46ccf369895 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -934,7 +934,7 @@ public function input($fieldName, $options = array()) { $options['type'] = 'hidden'; } if ( - $options['type'] === 'number' && + $options['type'] === 'number' && $type === 'float' && !isset($options['step']) ) {