From ce6658d2c871cf792f2fe5e7808ea4409591256b Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 8 Jun 2023 11:59:04 +0800 Subject: [PATCH] MDL-76838 core: Add unit test for invalid unicode sequences --- lib/tests/moodlelib_test.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tests/moodlelib_test.php b/lib/tests/moodlelib_test.php index 0abcc021c3e..3124b326987 100644 --- a/lib/tests/moodlelib_test.php +++ b/lib/tests/moodlelib_test.php @@ -179,6 +179,7 @@ class moodlelib_test extends \advanced_testcase { // Invalid utf8 string. $this->assertSame('aš', fix_utf8('a'.chr(130).'š'), 'This fails with buggy iconv() when mbstring extenstion is not available as fallback.'); + $this->assertSame('Hello ', fix_utf8('Hello ￿')); } public function test_optional_param() {