mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Add test for issue #3936
radio() method should accept an array for the label element. Refs #3936
This commit is contained in:
parent
a1866733a0
commit
e3e4efba0a
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue