Add test for issue #3936

radio() method should accept an array for the label element.

Refs #3936
This commit is contained in:
mark_story 2013-09-05 10:30:52 -04:00
parent a1866733a0
commit e3e4efba0a

View file

@ -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(
'<label for="ModelField1" class="checkbox float-left">Option A</label>',
$result
);
}
/**
* testSelect method
*