From 6757891a33ec0d5cbf369780e659e4a0013046b4 Mon Sep 17 00:00:00 2001 From: Christian Hieke Date: Thu, 24 Nov 2011 09:51:05 +0100 Subject: [PATCH] Ceeram suggested this change https://github.com/cakephp/cakephp/pull/322#issuecomment-2780158 --- .../Test/Case/View/Helper/FormHelperTest.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 12da2a986..9aa5a0cf3 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -3366,6 +3366,28 @@ class FormHelperTest extends CakeTestCase { '/fieldset' ); $this->assertTags($result, $expected); + + $result = $this->Form->radio( + 'Model.field', + array('option A', 'option B'), + array('disabled' => 'disabled', 'value' => 'option A') + ); + $expected = array( + 'fieldset' => array(), + 'legend' => array(), + 'Field', + '/legend', + array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0', 'disabled' => 'disabled', 'checked' => 'checked')), + array('label' => array('for' => 'ModelField0')), + 'option A', + '/label', + array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1', 'disabled' => 'disabled')), + array('label' => array('for' => 'ModelField1')), + 'option B', + '/label', + '/fieldset' + ); + $this->assertTags($result, $expected); } /**