function NameMungingTest::testUnMunge

Ensure that unmunge gets your name back.

File

drupal/core/modules/system/lib/Drupal/system/Tests/File/NameMungingTest.php, line 71
Definition of Drupal\system\Tests\File\NameMungingTest.

Class

NameMungingTest
Tests for file_munge_filename() and file_unmunge_filename().

Namespace

Drupal\system\Tests\File

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,
  )));
}