Skip to content
Permalink
Browse files

Add test for issue #3936

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

Refs #3936
  • Loading branch information...
markstory committed Sep 5, 2013
1 parent a186673 commit e3e4efba0afdca6394858474d1154867165f5a2a
Showing with 20 additions and 0 deletions.
  1. +20 −0 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -4077,6 +4077,26 @@ public function testRadioAddEmptyOption() {
$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
*

0 comments on commit e3e4efb

Please sign in to comment.
You can’t perform that action at this time.