[Form] simplified a test from previous merge
This commit is contained in:
parent
ac24f3e514
commit
1c0ba78833
@ -15,20 +15,12 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
|
||||
class FileTypeTest extends TypeTestCase
|
||||
{
|
||||
|
||||
public function testFormBuilderIfEntityHasFile()
|
||||
{
|
||||
$entity = new \StdClass;
|
||||
$entity->imageFile = $this->createUploadedFileMock('abcdef', 'original.jpg', true);
|
||||
|
||||
try {
|
||||
$form = $this->factory->createBuilder('form', $entity)
|
||||
->add('imageFile', 'file')
|
||||
->getForm();
|
||||
return;
|
||||
} catch (\Symfony\Component\Form\Exception\FormException $e) {
|
||||
$this->fail();
|
||||
}
|
||||
$this->factory->createBuilder('file')
|
||||
->getForm()
|
||||
->setData($this->createUploadedFileMock('abcdef', 'original.jpg', true))
|
||||
;
|
||||
}
|
||||
|
||||
public function testDontPassValueToView()
|
||||
|
Reference in New Issue
Block a user