[Form] simplified a test from previous merge

This commit is contained in:
Fabien Potencier 2012-11-24 13:04:10 +01:00
parent ac24f3e514
commit 1c0ba78833

View File

@ -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()