Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9edffd5

Browse filesBrowse files
committed
added a test case
1 parent 93368df commit 9edffd5
Copy full SHA for 9edffd5

File tree

1 file changed

+20
-0
lines changed
Filter options

1 file changed

+20
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/SimpleFormTest.php
+20Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.