8000 [Form] Add flexibility for EntityType by raziel057 · Pull Request #13990 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Add flexibility for EntityType #13990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add unit test
  • Loading branch information
raziel057 committed Mar 24, 2015
commit f0f1b42453b21c43793783c786bbd9c3abe24188
13 changes: 13 additions & 0 deletions src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ public function testConfigureQueryBuilderWithClosureReturningNonQueryBuilder()

$field->submit('2');
}

public function testConfigureQueryBuilderWithClosureReturningNull()
{
$field = $this->factory->createNamed('name', 'entity', null, array(
'em' => 'default',
'class' => self::SINGLE_IDENT_CLASS,
'query_builder' => function () {
return null;
},
));

$this->assertEquals(array(), $field->createView()->vars['choices']);
}

public function testSetDataSingleNull()
{
Expand Down
0