From 1fff6c7a6d64fd3544d66f41d26a364b599723bc Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Wed, 13 Jul 2022 10:27:58 +0100 Subject: [PATCH] Switch unicode filename test to 3-byte character MySQL 5.7 uses utf8mb3 encoding by default, meaning 4-byte characters (such as emoji) are not supported. This ensures compatibility of the presigned URL testing across databases, and prevents errors when attempting to visit the settings page. --- .../\360\237\230\200.txt" => "tests/fixtures/\350\257\225.txt" | 0 tests/object_file_system_test.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename "tests/fixtures/\360\237\230\200.txt" => "tests/fixtures/\350\257\225.txt" (100%) diff --git "a/tests/fixtures/\360\237\230\200.txt" "b/tests/fixtures/\350\257\225.txt" similarity index 100% rename from "tests/fixtures/\360\237\230\200.txt" rename to "tests/fixtures/\350\257\225.txt" diff --git a/tests/object_file_system_test.php b/tests/object_file_system_test.php index ba2d8f98..ae534151 100644 --- a/tests/object_file_system_test.php +++ b/tests/object_file_system_test.php @@ -607,7 +607,7 @@ public function test_can_generate_signed_url_with_unicode_filename() { $filehash = $file->get_contenthash(); try { $headers = [ - 'Content-Disposition' => 'attachment; filename="😀.txt"', + 'Content-Disposition' => 'attachment; filename="试.txt"', 'Content-Type' => 'text/plain', ]; $signedurl = $this->filesystem->externalclient->generate_presigned_url($filehash, $headers);