diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index 15e188f6283..84df8fa8675 100644 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -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); + } }