public function FileNameTest::testAlteredFilename in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 tests/src/Functional/FileNameTest.php \Drupal\Tests\tmgmt_smartling\Functional\FileNameTest::testAlteredFilename()
Test altered file name.
File
- tests/
src/ Functional/ FileNameTest.php, line 41
Class
- FileNameTest
- File name tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testAlteredFilename() {
\Drupal::service('module_installer')
->install([
'tmgmt_smartling_test_alter_filename',
]);
$translator = $this
->setUpSmartlingProviderSettings($this->smartlingPluginProviderSettings);
$job = $this
->requestTranslationForNode($this->testNodeId, $this->targetLanguage, $translator);
$fileName = $job
->getTranslatorPlugin()
->getFileName($job);
$this
->assertNotEqual($fileName, 'JobID1_en_fr.xml');
$this
->assertEqual($fileName, 'TEST_job_id_1.xml');
}