Skip to content

Commit 40eed99

Browse files
committed
Merge branch 'Yproximite-fix_browserkit_upload'
2 parents bb75e90 + e0a0879 commit 40eed99

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"behat/behat": "~3.0",
1111
"behat/mink-extension": "~2.0",
1212
"justinrainbow/json-schema": "~1.4",
13-
"symfony/property-access": "~2.3|~3.0"
13+
"symfony/property-access": "~2.3|~3.0",
14+
"symfony/http-foundation": "~2.3|~3.0"
1415
},
1516

1617
"require-dev": {

src/HttpCall/Request/BrowserKit.php

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Sanpi\Behatch\HttpCall\Request;
44

55
use Behat\Mink\Mink;
6+
use Symfony\Component\HttpFoundation\File\UploadedFile;
67

78
class BrowserKit
89
{
@@ -56,6 +57,10 @@ public function getContent()
5657

5758
public function send($method, $url, $parameters = [], $files = [], $content = null, $headers = [])
5859
{
60+
foreach ($files as $originalName => &$file) {
61+
$file = new UploadedFile($file, $originalName);
62+
}
63+
5964
$client = $this->mink->getSession()->getDriver()->getClient();
6065

6166
$client->followRedirects(false);

0 commit comments

Comments
 (0)