public function testDataClassMustBeValidClassOrInterface() { $this->
expectException(InvalidArgumentException::
class);
$this->factory->
createBuilder(static::TESTED_TYPE, null,
[ 'data_class' => 'foobar',
]);
} public function testSubmitNullUsesDefaultEmptyData($emptyData =
[],
$expectedData =
[]) { parent::
testSubmitNullUsesDefaultEmptyData($emptyData,
$expectedData);
} public function testSubmitWithEmptyDataCreatesObjectIfClassAvailable() { $form =
$this->factory->
createBuilder(static::TESTED_TYPE, null,
[ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author',
'required' => false,
]) ->
add('firstName', TextTypeTest::TESTED_TYPE
) ->
add('lastName', TextTypeTest::TESTED_TYPE
) ->
getForm();