reverted: --- b/core/modules/system/src/Tests/File/NameMungingTest.php +++ a/core/modules/system/src/Tests/File/NameMungingTest.php @@ -66,14 +66,10 @@ * White listed extensions are ignored by file_munge_filename(). */ function testMungeIgnoreWhitelisted() { + // Declare our extension as whitelisted. The declared extensions should + // be case insensitive so test using one with a different case. - // Declare our extension as whitelisted. - // The declared extensions should be case insensitive. - // Test using one with a different case. $munged_name = file_munge_filename($this->nameWithUcExt, $this->badExtension); $this->assertIdentical($munged_name, $this->nameWithUcExt, format_string('The new filename (%munged) matches the original (%original) once the extension has been whitelisted.', array('%munged' => $munged_name, '%original' => $this->nameWithUcExt))); - // Test with same case. - $munged_name = file_munge_filename($this->name, $this->badExtension); - $this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) when case of the extension is the same as that whitelisted.', array('%munged' => $munged_name, '%original' => $this->name))); // The allowed extensions should also be normalized. $munged_name = file_munge_filename($this->name, strtoupper($this->badExtension)); $this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) also when the whitelisted extension is in uppercase.', array('%munged' => $munged_name, '%original' => $this->name))); only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/File/NameMungingTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/NameMungingTest.php @@ -70,6 +70,9 @@ function testMungeIgnoreWhitelisted() { // be case insensitive so test using one with a different case. $munged_name = file_munge_filename($this->nameWithUcExt, $this->badExtension); $this->assertIdentical($munged_name, $this->nameWithUcExt, format_string('The new filename (%munged) matches the original (%original) once the extension has been whitelisted.', array('%munged' => $munged_name, '%original' => $this->nameWithUcExt))); + // Test with same case. + $munged_name = file_munge_filename($this->name, $this->badExtension); + $this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) when case of the extension is the same as that whitelisted.', array('%munged' => $munged_name, '%original' => $this->name))); // The allowed extensions should also be normalized. $munged_name = file_munge_filename($this->name, strtoupper($this->badExtension)); $this->assertIdentical($munged_name, $this->name, format_string('The new filename (%munged) matches the original (%original) also when the whitelisted extension is in uppercase.', array('%munged' => $munged_name, '%original' => $this->name)));