public function NameMungingTest::testUnMunge in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/File/NameMungingTest.php \Drupal\KernelTests\Core\File\NameMungingTest::testUnMunge()
Ensure that unmunge gets your name back.
File
- core/
tests/ Drupal/ KernelTests/ Core/ File/ NameMungingTest.php, line 119
Class
- NameMungingTest
- Tests filename munging and unmunging.
Namespace
Drupal\KernelTests\Core\FileCode
public function testUnMunge() {
$munged_name = file_munge_filename($this->name, '', FALSE);
$unmunged_name = file_unmunge_filename($munged_name);
$this
->assertSame($unmunged_name, $this->name, new FormattableMarkup('The unmunged (%unmunged) filename matches the original (%original)', [
'%unmunged' => $unmunged_name,
'%original' => $this->name,
]));
}