aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Http/Client/ResponseTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Http/Client/ResponseTest.php')
-rw-r--r--tests/lib/Http/Client/ResponseTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/Http/Client/ResponseTest.php b/tests/lib/Http/Client/ResponseTest.php
index f8f520d6a73..1acf1eb1cbd 100644
--- a/tests/lib/Http/Client/ResponseTest.php
+++ b/tests/lib/Http/Client/ResponseTest.php
@@ -1,15 +1,15 @@
<?php
+
/**
- * Copyright (c) 2015 Lukas Reschke <lukas@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Http\Client;
use GuzzleHttp\Psr7\Response as GuzzleResponse;
-use function GuzzleHttp\Psr7\stream_for;
+use GuzzleHttp\Psr7\Utils;
use OC\Http\Client\Response;
/**
@@ -24,22 +24,22 @@ class ResponseTest extends \Test\TestCase {
$this->guzzleResponse = new GuzzleResponse(418);
}
- public function testGetBody() {
- $response = new Response($this->guzzleResponse->withBody(stream_for('MyResponse')));
+ public function testGetBody(): void {
+ $response = new Response($this->guzzleResponse->withBody(Utils::streamFor('MyResponse')));
$this->assertSame('MyResponse', $response->getBody());
}
- public function testGetStatusCode() {
+ public function testGetStatusCode(): void {
$response = new Response($this->guzzleResponse);
$this->assertSame(418, $response->getStatusCode());
}
- public function testGetHeader() {
+ public function testGetHeader(): void {
$response = new Response($this->guzzleResponse->withHeader('bar', 'foo'));
$this->assertSame('foo', $response->getHeader('bar'));
}
- public function testGetHeaders() {
+ public function testGetHeaders(): void {
$response = new Response($this->guzzleResponse
->withHeader('bar', 'foo')
->withHeader('x-awesome', 'yes')