Skip to content

Commit

Permalink
Added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
lilHermit committed Jan 24, 2017
1 parent 446add8 commit 75a92ba
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/TestCase/View/Helper/FormHelperTest.php
Expand Up @@ -8473,4 +8473,29 @@ public function testAutoDomId()
];
$this->assertHtml($expected, $result);
}

/**
* testNestedLabelInput method
*
* Test the `nestedInput` parameter
*
* @return void
*/
public function testNestedLabelInput()
{
$result = $this->Form->input('foo', [ 'nestedInput' => true]);
$expected = [
'div' => ['class' => 'input text'],
'label' => ['for' => 'foo'],
['input' => [
'type' => 'text',
'name' => 'foo',
'id' => 'foo'
]],
'Foo',
'/label',
'/div'
];
$this->assertHtml($expected, $result);
}
}

0 comments on commit 75a92ba

Please sign in to comment.