Skip to content
Permalink
Browse files

Add test for expanded attributes.

Refs #6478
  • Loading branch information...
markstory committed May 5, 2015
1 parent 029501d commit afb74be0b8cf18858bacb107057adac57ca1efa1
Showing with 22 additions and 0 deletions.
  1. +22 −0 tests/TestCase/View/Helper/FormHelperTest.php
@@ -3723,6 +3723,28 @@ public function testRadio()
'/label',
];
$this->assertHtml($expected, $result);
$result = $this->Form->radio(
'Employee.gender',
[
['value' => 'male', 'text' => 'Male', 'style' => 'width:20px'],
['value' => 'female', 'text' => 'Female', 'style' => 'width:20px'],
]
);
$expected = [
'input' => ['type' => 'hidden', 'name' => 'Employee[gender]', 'value' => ''],
['label' => ['for' => 'employee-gender-male']],
['input' => ['type' => 'radio', 'name' => 'Employee[gender]', 'value' => 'male',
'id' => 'employee-gender-male', 'style' => 'width:20px']],
'Male',
'/label',
['label' => ['for' => 'employee-gender-female']],
['input' => ['type' => 'radio', 'name' => 'Employee[gender]', 'value' => 'female',
'id' => 'employee-gender-female', 'style' => 'width:20px']],
'Female',
'/label',
];
$this->assertHtml($expected, $result);
}
/**

0 comments on commit afb74be

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