minor #30132 [Form] add back test after fixing it (xabbuh)
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] add back test after fixing it
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29934#discussion_r250501108
| License | MIT
| Doc PR |
Commits
-------
0daeba8e8a
add back test after fixing it
This commit is contained in:
commit
a205211d16
@ -285,6 +285,26 @@ abstract class AbstractRequestHandlerTest extends TestCase
|
|||||||
$this->assertSame($file, $form->getData());
|
$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
|
* @dataProvider getPostMaxSizeFixtures
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user