You are here

function FileNameMungingTest::testUnMunge in Drupal 7

Ensure that unmunge gets your name back.

File

modules/simpletest/tests/file.test, line 2809
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,
  )));
}