diff options
Diffstat (limited to 'build/integration/features/bootstrap/FilesDropContext.php')
-rw-r--r-- | build/integration/features/bootstrap/FilesDropContext.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/build/integration/features/bootstrap/FilesDropContext.php b/build/integration/features/bootstrap/FilesDropContext.php index 62d06ddf750..a81df559a23 100644 --- a/build/integration/features/bootstrap/FilesDropContext.php +++ b/build/integration/features/bootstrap/FilesDropContext.php @@ -50,13 +50,10 @@ class FilesDropContext implements Context, SnippetAcceptingContext { $options['headers'] = [ 'X-REQUESTED-WITH' => 'XMLHttpRequest' ]; - - $request = $client->createRequest('PUT', $fullUrl, $options); - $file = \GuzzleHttp\Stream\Stream::factory($content); - $request->setBody($file); + $options['body'] = \GuzzleHttp\Psr7\stream_for($content); try { - $this->response = $client->send($request); + $this->response = $client->request('PUT', $fullUrl, $options); } catch (\GuzzleHttp\Exception\ClientException $e) { $this->response = $e->getResponse(); } @@ -82,10 +79,8 @@ class FilesDropContext implements Context, SnippetAcceptingContext { 'X-REQUESTED-WITH' => 'XMLHttpRequest' ]; - $request = $client->createRequest('MKCOL', $fullUrl, $options); - try { - $this->response = $client->send($request); + $this->response = $client->request('MKCOL', $fullUrl, $options); } catch (\GuzzleHttp\Exception\ClientException $e) { $this->response = $e->getResponse(); } |