mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17176] Work around bug with fileuploads in BrowserKit
PHPBB3-17176
This commit is contained in:
parent
2d7c668a28
commit
549c818a5c
1 changed files with 10 additions and 0 deletions
|
@ -164,6 +164,16 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||
*/
|
||||
static public function submit(Symfony\Component\DomCrawler\Form $form, array $values = array(), $assert_response_html = true)
|
||||
{
|
||||
// Remove files from form if no file was submitted
|
||||
// See: https://github.com/symfony/symfony/issues/49014
|
||||
foreach ($form->getFiles() as $field_name => $value)
|
||||
{
|
||||
if (!$value['name'] && !$value['tmp_name'])
|
||||
{
|
||||
$form->remove($field_name);
|
||||
}
|
||||
}
|
||||
|
||||
$crawler = self::$client->submit($form, $values);
|
||||
|
||||
if ($assert_response_html)
|
||||
|
|
Loading…
Add table
Reference in a new issue