Skip to content

Commit

Permalink
add back test after fixing it
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Feb 10, 2019
1 parent bb54e40 commit 0daeba8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Symfony/Component/Form/Tests/AbstractRequestHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,26 @@ public function testSubmitMultipleFiles($method)
$this->assertSame($file, $form->getData());
}

/**
* @dataProvider methodExceptGetProvider
*/
public function testSubmitFileWithNamelessForm($method)
{
$form = $this->createForm('', $method, true);
$fileForm = $this->createBuilder('document', false, ['allow_file_upload' => true])->getForm();
$form->add($fileForm);
$file = $this->getUploadedFile();
$this->setRequestData($method, [
'document' => null,
], [
'document' => $file,
]);
$this->requestHandler->handleRequest($form, $this->request);

$this->assertTrue($form->isSubmitted());
$this->assertSame($file, $fileForm->getData());
}

/**
* @dataProvider getPostMaxSizeFixtures
*/
Expand Down

0 comments on commit 0daeba8

Please sign in to comment.