Permalink
Browse files

Add tests for usage of radioContainer.

  • Loading branch information...
1 parent 7c2e902 commit 52f16a94f484d1081a4abf0ed2a4e57d2213977c @markstory markstory committed Jan 10, 2014
Showing with 21 additions and 1 deletion.
  1. +21 −1 Test/TestCase/View/Input/RadioTest.php
@@ -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.