Skip to content

Commit

Permalink
Add tests for usage of radioContainer.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 11, 2014
1 parent 7c2e902 commit 52f16a9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Test/TestCase/View/Input/RadioTest.php
Expand Up @@ -300,7 +300,27 @@ public function testRenderLabelOptions() {
* @return void
*/
public function testRenderContainerTemplate() {
$this->markTestIncomplete();
$this->templates->add([
'radioContainer' => '<div class="radio">{{input}}{{label}}</div>'
]);
$radio = new Radio($this->templates);
$data = [
'name' => 'Versions[ver]',
'options' => [
1 => 'one',
'1x' => 'one x',
'2' => 'two',
],
];
$result = $radio->render($data);
$this->assertContains(
'<div class="radio"><input type="radio"',
$result
);
$this->assertContains(
'</label></div>',
$result
);
}

}

0 comments on commit 52f16a9

Please sign in to comment.