function FileNameMungingTest::testUnMunge

7.x file.test FileNameMungingTest::testUnMunge()

Ensure that unmunge gets your name back.

File

drupal-7.x/modules/simpletest/tests/file.test, line 2612
This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.

Class

FileNameMungingTest
Tests for file_munge_filename() and file_unmunge_filename().

Code

function testUnMunge() {
  $munged_name = file_munge_filename($this->name, '', FALSE);
  $unmunged_name = file_unmunge_filename($munged_name);
  $this->assertIdentical($unmunged_name, $this->name, format_string('The unmunged (%unmunged) filename matches the original (%original)', array('%unmunged' => $unmunged_name, '%original' => $this->name)));
}