Skip to content

Commit 2ef80ac

Browse files
committed
ci(integration): Fix test with newer guzzle version
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 49ec9a2 commit 2ef80ac

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

build/integration/features/bootstrap/Avatar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function loggedInUserGetsTemporaryAvatarWith(string $statusCode) {
109109
* @param string $source
110110
*/
111111
public function loggedInUserPostsTemporaryAvatarFromFile(string $source) {
112-
$file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
112+
$file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
113113

114114
$this->sendingAToWithRequesttoken('POST', '/index.php/avatar',
115115
[

build/integration/features/bootstrap/ChecksumsContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private function getPasswordForUser($userName) {
7979
* @param string $checksum
8080
*/
8181
public function userUploadsFileToWithChecksum($user, $source, $destination, $checksum) {
82-
$file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
82+
$file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
8383
try {
8484
$this->response = $this->client->put(
8585
$this->baseUrl . '/remote.php/webdav' . $destination,

build/integration/features/bootstrap/FilesDropContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function droppingFileWith($path, $content) {
5151
$options['headers'] = [
5252
'X-REQUESTED-WITH' => 'XMLHttpRequest'
5353
];
54-
$options['body'] = \GuzzleHttp\Psr7\stream_for($content);
54+
$options['body'] = \GuzzleHttp\Psr7\Utils::streamFor($content);
5555

5656
try {
5757
$this->response = $client->request('PUT', $fullUrl, $options);

build/integration/features/bootstrap/WebDav.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ public function checkElementList($user, $expectedElements) {
491491
* @param string $destination
492492
*/
493493
public function userUploadsAFileTo($user, $source, $destination) {
494-
$file = \GuzzleHttp\Psr7\stream_for(fopen($source, 'r'));
494+
$file = \GuzzleHttp\Psr7\Utils::streamFor(fopen($source, 'r'));
495495
try {
496496
$this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file);
497497
} catch (\GuzzleHttp\Exception\ServerException $e) {
@@ -523,7 +523,7 @@ public function userAddsAFileTo($user, $bytes, $destination) {
523523
* @When User :user uploads file with content :content to :destination
524524
*/
525525
public function userUploadsAFileWithContentTo($user, $content, $destination) {
526-
$file = \GuzzleHttp\Psr7\stream_for($content);
526+
$file = \GuzzleHttp\Psr7\Utils::streamFor($content);
527527
try {
528528
$this->response = $this->makeDavRequest($user, "PUT", $destination, [], $file);
529529
} catch (\GuzzleHttp\Exception\ServerException $e) {
@@ -581,7 +581,7 @@ public function userCreatedAFolder($user, $destination) {
581581
*/
582582
public function userUploadsChunkFileOfWithToWithChecksum($user, $num, $total, $data, $destination) {
583583
$num -= 1;
584-
$data = \GuzzleHttp\Psr7\stream_for($data);
584+
$data = \GuzzleHttp\Psr7\Utils::streamFor($data);
585585
$file = $destination . '-chunking-42-' . $total . '-' . $num;
586586
$this->makeDavRequest($user, 'PUT', $file, ['OC-Chunked' => '1'], $data, "uploads");
587587
}
@@ -652,7 +652,7 @@ public function userCreatesANewChunkingUploadWithId($user, $id) {
652652
* @Given user :user uploads new chunk file :num with :data to id :id
653653
*/
654654
public function userUploadsNewChunkFileOfWithToId($user, $num, $data, $id) {
655-
$data = \GuzzleHttp\Psr7\stream_for($data);
655+
$data = \GuzzleHttp\Psr7\Utils::streamFor($data);
656656
$destination = '/uploads/' . $user . '/' . $id . '/' . $num;
657657
$this->makeDavRequest($user, 'PUT', $destination, [], $data, "uploads");
658658
}

0 commit comments

Comments
 (0)