Skip to content

Commit

Permalink
added a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed Apr 6, 2019
1 parent 93368df commit 9edffd5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Symfony/Component/Form/Tests/SimpleFormTest.php
Expand Up @@ -54,6 +54,26 @@ public function getIterator()

class SimpleFormTest extends AbstractFormTest
{
/**
* @dataProvider provideFormNames
*/
public function testGetPropertyPath($name, $propertyPath)
{
$config = new FormConfigBuilder($name, null, $this->dispatcher);
$form = new Form($config);

$this->assertEquals(new PropertyPath($propertyPath), $form->getPropertyPath());
}

public function provideFormNames()
{
yield [null, null];
yield ['', null];
yield ['0', '0'];
yield [0, '0'];
yield ['name', 'name'];
}

public function testDataIsInitializedToConfiguredValue()
{
$model = new FixedDataTransformer([
Expand Down

0 comments on commit 9edffd5

Please sign in to comment.