diff options
author | Robin Appelman <robin@icewind.nl> | 2018-02-09 13:19:39 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-02-09 17:13:30 +0100 |
commit | 359ccbc023ce134c828a620fb6f7e70e886e5e44 (patch) | |
tree | c801d4ab01cbe61f0fee3f327ff564e83e783413 /build/integration/features/bootstrap/FilesDropContext.php | |
parent | 97b44605f4d38a1742cf95204ed6b5e9ca0d6951 (diff) | |
download | nextcloud-server-359ccbc023ce134c828a620fb6f7e70e886e5e44.tar.gz nextcloud-server-359ccbc023ce134c828a620fb6f7e70e886e5e44.zip |
Adjust integration tests to new guzzle
Signed-off-by: Robin Appelman <robin@icewind.nl>
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(); } |