summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/ChecksumsContext.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-02-09 13:19:39 +0100
committerRobin Appelman <robin@icewind.nl>2018-02-09 17:13:30 +0100
commit359ccbc023ce134c828a620fb6f7e70e886e5e44 (patch)
treec801d4ab01cbe61f0fee3f327ff564e83e783413 /build/integration/features/bootstrap/ChecksumsContext.php
parent97b44605f4d38a1742cf95204ed6b5e9ca0d6951 (diff)
downloadnextcloud-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/ChecksumsContext.php')
-rw-r--r--build/integration/features/bootstrap/ChecksumsContext.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/build/integration/features/bootstrap/ChecksumsContext.php b/build/integration/features/bootstrap/ChecksumsContext.php
index f2fc2d1d653..434a3b65f15 100644
--- a/build/integration/features/bootstrap/ChecksumsContext.php
+++ b/build/integration/features/bootstrap/ChecksumsContext.php
@@ -78,7 +78,7 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
*/
public function userUploadsFileToWithChecksum($user, $source, $destination, $checksum)
{
- $file = \GuzzleHttp\Stream\Stream::factory(fopen($source, 'r'));
+ $file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
try {
$this->response = $this->client->put(
$this->baseUrl . '/remote.php/webdav' . $destination,
@@ -117,7 +117,7 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
*/
public function userRequestTheChecksumOfViaPropfind($user, $path)
{
- $request = $this->client->createRequest(
+ $this->response = $this->client->request(
'PROPFIND',
$this->baseUrl . '/remote.php/webdav' . $path,
[
@@ -133,7 +133,6 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
]
]
);
- $this->response = $this->client->send($request);
}
/**
@@ -182,8 +181,8 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
*/
public function theHeaderChecksumShouldMatch($checksum)
{
- if ($this->response->getHeader('OC-Checksum') !== $checksum) {
- throw new \Exception("Expected $checksum, got ".$this->response->getHeader('OC-Checksum'));
+ if ($this->response->getHeader('OC-Checksum')[0] !== $checksum) {
+ throw new \Exception("Expected $checksum, got ".$this->response->getHeader('OC-Checksum')[0]);
}
}
@@ -195,7 +194,7 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
*/
public function userCopiedFileTo($user, $source, $destination)
{
- $request = $this->client->createRequest(
+ $this->response = $this->client->request(
'MOVE',
$this->baseUrl . '/remote.php/webdav' . $source,
[
@@ -208,7 +207,6 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
],
]
);
- $this->response = $this->client->send($request);
}
/**
@@ -236,7 +234,7 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
public function theOcChecksumHeaderShouldNotBeThere()
{
if ($this->response->hasHeader('OC-Checksum')) {
- throw new \Exception("Expected no checksum header but got ".$this->response->getHeader('OC-Checksum'));
+ throw new \Exception("Expected no checksum header but got ".$this->response->getHeader('OC-Checksum')[0]);
}
}