You are here

function NameMungingTest::testUnMunge in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/File/NameMungingTest.php \Drupal\system\Tests\File\NameMungingTest::testUnMunge()

Ensure that unmunge gets your name back.

File

core/modules/system/src/Tests/File/NameMungingTest.php, line 86
Contains \Drupal\system\Tests\File\NameMungingTest.

Class

NameMungingTest
Tests filename munging and unmunging.

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