diff options
Diffstat (limited to 'tests/lib/AppFramework/Http/DataResponseTest.php')
-rw-r--r-- | tests/lib/AppFramework/Http/DataResponseTest.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php index 39f7e76ea0c..e9a2c511140 100644 --- a/tests/lib/AppFramework/Http/DataResponseTest.php +++ b/tests/lib/AppFramework/Http/DataResponseTest.php @@ -11,6 +11,7 @@ namespace Test\AppFramework\Http; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; +use OCP\Server; class DataResponseTest extends \Test\TestCase { /** @@ -24,7 +25,7 @@ class DataResponseTest extends \Test\TestCase { } - public function testSetData() { + public function testSetData(): void { $params = ['hi', 'yo']; $this->response->setData($params); @@ -32,7 +33,7 @@ class DataResponseTest extends \Test\TestCase { } - public function testConstructorAllowsToSetData() { + public function testConstructorAllowsToSetData(): void { $data = ['hi']; $code = 300; $response = new DataResponse($data, $code); @@ -42,7 +43,7 @@ class DataResponseTest extends \Test\TestCase { } - public function testConstructorAllowsToSetHeaders() { + public function testConstructorAllowsToSetHeaders(): void { $data = ['hi']; $code = 300; $headers = ['test' => 'something']; @@ -53,7 +54,7 @@ class DataResponseTest extends \Test\TestCase { 'Content-Security-Policy' => "default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'", 'Feature-Policy' => "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'", 'X-Robots-Tag' => 'noindex, nofollow', - 'X-Request-Id' => \OC::$server->get(IRequest::class)->getId(), + 'X-Request-Id' => Server::get(IRequest::class)->getId(), ]; $expectedHeaders = array_merge($expectedHeaders, $headers); @@ -63,7 +64,7 @@ class DataResponseTest extends \Test\TestCase { } - public function testChainability() { + public function testChainability(): void { $params = ['hi', 'yo']; $this->response->setData($params) ->setStatus(Http::STATUS_NOT_FOUND); |