From 3a2cefa5090558422db89e7cba7518f177785992 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 11 Sep 2024 07:37:01 +0200 Subject: [PATCH] refactor: Apply PHP7.3 sets Signed-off-by: Christoph Wurst --- rector.php | 2 +- tests/Unit/Http/AttachmentDownloadResponseTest.php | 5 +---- tests/Unit/Http/ProxyDownloadResponseTest.php | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/rector.php b/rector.php index 48d4f1efd9..aec92a3cd6 100644 --- a/rector.php +++ b/rector.php @@ -22,5 +22,5 @@ phpunit: true, ) ->withPhpSets( - php71: true, + php73: true, ); diff --git a/tests/Unit/Http/AttachmentDownloadResponseTest.php b/tests/Unit/Http/AttachmentDownloadResponseTest.php index bcdd441e6f..f63ef75886 100644 --- a/tests/Unit/Http/AttachmentDownloadResponseTest.php +++ b/tests/Unit/Http/AttachmentDownloadResponseTest.php @@ -14,11 +14,8 @@ class AttachmentDownloadResponseTest extends TestCase { /** * @dataProvider providesResponseData - * @param $content - * @param $filename - * @param $contentType */ - public function testIt($content, $filename, $contentType) { + public function testIt(string $content, string $filename, string $contentType) { $resp = new AttachmentDownloadResponse($content, $filename, $contentType); $headers = $resp->getHeaders(); $this->assertEquals($content, $resp->render()); diff --git a/tests/Unit/Http/ProxyDownloadResponseTest.php b/tests/Unit/Http/ProxyDownloadResponseTest.php index 42668596c9..a24d3c403d 100644 --- a/tests/Unit/Http/ProxyDownloadResponseTest.php +++ b/tests/Unit/Http/ProxyDownloadResponseTest.php @@ -25,7 +25,7 @@ public function testIt($content, $filename, $contentType) { $this->assertArrayHasKey('Content-Type', $headers); $this->assertEquals($contentType, $headers['Content-Type']); $this->assertArrayHasKey('Content-Disposition', $headers); - $pos = strpos($headers['Content-Disposition'], $filename); + $pos = strpos($headers['Content-Disposition'], (string)$filename); $this->assertTrue($pos > 0); }