aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Http/DownloadResponseTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Http/DownloadResponseTest.php')
-rw-r--r--tests/lib/AppFramework/Http/DownloadResponseTest.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php
index 425e5ecde1f..b2f60edd999 100644
--- a/tests/lib/AppFramework/Http/DownloadResponseTest.php
+++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php
@@ -19,7 +19,7 @@ class DownloadResponseTest extends \Test\TestCase {
parent::setUp();
}
- public function testHeaders() {
+ public function testHeaders(): void {
$response = new ChildDownloadResponse('file', 'content');
$headers = $response->getHeaders();
@@ -27,17 +27,15 @@ class DownloadResponseTest extends \Test\TestCase {
$this->assertEquals('content', $headers['Content-Type']);
}
- /**
- * @dataProvider filenameEncodingProvider
- */
- public function testFilenameEncoding(string $input, string $expected) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('filenameEncodingProvider')]
+ public function testFilenameEncoding(string $input, string $expected): void {
$response = new ChildDownloadResponse($input, 'content');
$headers = $response->getHeaders();
- $this->assertEquals('attachment; filename="'.$expected.'"', $headers['Content-Disposition']);
+ $this->assertEquals('attachment; filename="' . $expected . '"', $headers['Content-Disposition']);
}
- public function filenameEncodingProvider() : array {
+ public static function filenameEncodingProvider() : array {
return [
['TestName.txt', 'TestName.txt'],
['A "Quoted" Filename.txt', 'A \\"Quoted\\" Filename.txt'],