From e3e4efba0afdca6394858474d1154867165f5a2a Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 5 Sep 2013 10:30:52 -0400 Subject: [PATCH] Add test for issue #3936 radio() method should accept an array for the label element. Refs #3936 --- .../Test/Case/View/Helper/FormHelperTest.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index a09c713bf..ddd1f9fd9 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -4077,6 +4077,26 @@ class FormHelperTest extends CakeTestCase { $this->assertTextNotContains('"Model1Field"', $result); } +/** + * Test that radio() accepts an array for label + * + * @return void + */ + public function testRadioLabelArray() { + $result = $this->Form->input('Model.field', array( + 'type' => 'radio', + 'legend' => false, + 'label' => array( + 'class' => 'checkbox float-left', + ), + 'options' => array('1' => 'Option A', '2' => 'Option B.') + )); + $this->assertTextContains( + '', + $result + ); + } + /** * testSelect method *