This commit is contained in:
Christian Hieke 2011-11-24 09:51:05 +01:00
parent 61b9d77b75
commit 6757891a33

View file

@ -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);
}
/**