From a707709e1de2b0834942a87e7cdd88c90adcdb43 Mon Sep 17 00:00:00 2001 From: ADmad Date: Fri, 28 Feb 2014 02:34:16 +0530 Subject: [PATCH 1/8] Added test for FormHelper::radio(). Tests generating radio input for field with model other than one used in create(). Refs #2911. --- .../Test/Case/View/Helper/FormHelperTest.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 9d436133b..0786c6007 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -3730,6 +3730,39 @@ class FormHelperTest extends CakeTestCase { $this->assertTags($result, $expected); } +/** + * testRadioDifferentModel + * Refs #2911 + * + * @return void + */ + public function testRadioDifferentModel() { + $this->Form->create('User'); + + $result = $this->Form->radio( + 'Model.field', + array('v1' => 'option A', 'v2' => 'option B'), + array('label' => true, 'legend' => false, 'value' => false) + ); + $expected = array( + array('input' => array( + 'type' => 'radio', 'name' => 'data[Model][field]', + 'value' => 'v1', 'id' => 'ModelFieldV1' + )), + array('label' => array('for' => 'ModelFieldV1')), + 'option A', + '/label', + array('input' => array( + 'type' => 'radio', 'name' => 'data[Model][field]', + 'value' => 'v2', 'id' => 'ModelFieldV2' + )), + array('label' => array('for' => 'ModelFieldV2')), + 'option B', + '/label' + ); + $this->assertTags($result, $expected); + } + /** * Test radio inputs with between as string or array. Also ensure * that an array with less between elements works. From 45cabd40fe60c7b7d71f148d100050576328338b Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 1 Mar 2014 21:22:04 -0500 Subject: [PATCH 2/8] Update version number to 2.4.6 --- lib/Cake/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/VERSION.txt b/lib/Cake/VERSION.txt index 22bb0e90a..268820d46 100644 --- a/lib/Cake/VERSION.txt +++ b/lib/Cake/VERSION.txt @@ -17,4 +17,4 @@ // @license http://www.opensource.org/licenses/mit-license.php MIT License // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -2.4.5 +2.4.6 From a17345cb92cf164afdca1ec129513302851938cb Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 1 Mar 2014 21:32:36 -0500 Subject: [PATCH 3/8] Update build.xml file so PEAR packages include Fixtures. --- build.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 82ee704d7..42ed084bd 100644 --- a/build.xml +++ b/build.xml @@ -29,7 +29,9 @@ - + + +