From 359ccbc023ce134c828a620fb6f7e70e886e5e44 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Feb 2018 13:19:39 +0100 Subject: Adjust integration tests to new guzzle Signed-off-by: Robin Appelman --- build/integration/features/bootstrap/FilesDropContext.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'build/integration/features/bootstrap/FilesDropContext.php') 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(); } -- cgit v1.2.3