File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1717use Config \Modules ;
1818use Config \Services ;
1919use InvalidArgumentException ;
20+ use RuntimeException ;
2021use UnnamespacedClass ;
2122
2223/**
@@ -222,6 +223,16 @@ public function testSanitizationFilenameEdges()
222223 $ this ->loader ->sanitizeFilename ($ test );
223224 }
224225
226+ public function testSanitizationRegexError ()
227+ {
228+ $ this ->expectException (RuntimeException::class);
229+ $ this ->expectExceptionMessage ('Malformed UTF-8 characters, possibly incorrectly encoded filename: ' );
230+
231+ $ test = mb_convert_encoding ('クラスファイル.php ' , 'EUC-JP ' , 'UTF-8 ' );
232+
233+ $ this ->loader ->sanitizeFilename ($ test );
234+ }
235+
225236 public function testSanitizationAllowUnicodeChars ()
226237 {
227238 $ test = 'Ä/path/to/some/file.php ' ;
You can’t perform that action at this time.
0 commit comments