8000 added a test case · symfony/symfony@9edffd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9edffd5

Browse files
committed
added a test case
1 parent 93368df commit 9edffd5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Symfony/Component/Form/Tests/SimpleFormTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ public function getIterator()
5454

5555
class SimpleFormTest extends AbstractFormTest
5656
{
57+
/**
58+
* @dataProvider provideFormNames
59+
*/
60+
public function testGetPropertyPath($name, $propertyPath)
61+
{
62+
$config = new FormConfigBuilder($name, null, $this->dispatcher);
63+
$form = new Form($config);
64+
65+
$this->assertEquals(new PropertyPath($propertyPath), $form->getPropertyPath());
66+
}
67+
68+
public function provideFormNames()
69+
{
70+
yield [null, null];
71+
yield ['', null];
72+
yield ['0', '0'];
73+
yield [0, '0'];
74+
yield ['name', 'name'];
75+
}
76+
5777
public function testDataIsInitializedToConfiguredValue()
5878
{
5979
$model = new FixedDataTransformer([

0 commit comments

Comments
 (0)
0