diff -u b/core/modules/system/src/Tests/File/NameMungingTest.php b/core/modules/system/src/Tests/File/NameMungingTest.php --- b/core/modules/system/src/Tests/File/NameMungingTest.php +++ b/core/modules/system/src/Tests/File/NameMungingTest.php @@ -71,13 +71,14 @@ * White listed extensions are ignored by file_munge_filename(). */ function testMungeIgnoreWhitelisted() { - // Most commonly, extensions are same casing and we expect no changes. - $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 casing of the extension is same as the whitelisted.', array('%munged' => $munged_name, '%original' => $this->name))); - // 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))); @@ -93,2 +94,3 @@ } + }