Fix indentation.

This commit is contained in:
mark_story 2016-05-22 16:39:49 -04:00
parent 1a7e8c51e7
commit d5d46e21bd
2 changed files with 23 additions and 23 deletions

View file

@ -3914,24 +3914,24 @@ class FormHelperTest extends CakeTestCase {
);
$this->assertTags($result, $expected);
$result = $this->Form->radio('Model.field', array('option A', 'option B'), array('fieldset' => 'classy-stuff'));
$expected = array(
'fieldset' => array('class' => 'classy-stuff'),
'legend' => array(),
'Field',
'/legend',
'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'),
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')),
array('label' => array('for' => 'ModelField0')),
'option A',
'/label',
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')),
array('label' => array('for' => 'ModelField1')),
'option B',
'/label',
'/fieldset'
);
$this->assertTags($result, $expected);
$result = $this->Form->radio('Model.field', array('option A', 'option B'), array('fieldset' => 'classy-stuff'));
$expected = array(
'fieldset' => array('class' => 'classy-stuff'),
'legend' => array(),
'Field',
'/legend',
'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '', 'id' => 'ModelField_'),
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField0')),
array('label' => array('for' => 'ModelField0')),
'option A',
'/label',
array('input' => array('type' => 'radio', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField1')),
array('label' => array('for' => 'ModelField1')),
'option B',
'/label',
'/fieldset'
);
$this->assertTags($result, $expected);
$result = $this->Form->radio(
'Employee.gender',

View file

@ -975,11 +975,11 @@ class FormHelper extends AppHelper {
$out .= $this->input($name, $options);
}
if (is_string($fieldset)) {
$fieldsetClass = array('class' => $fieldset);
} else {
$fieldsetClass = '';
}
if (is_string($fieldset)) {
$fieldsetClass = array('class' => $fieldset);
} else {
$fieldsetClass = '';
}
if ($fieldset) {
if ($legend) {