public function PushBackControllerTest::testPushBackNonExistingJob in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Functional/PushBackControllerTest.php \Drupal\Tests\tmgmt_smartling\Functional\PushBackControllerTest::testPushBackNonExistingJob()
Push back non existing job test.
File
- tests/
src/ Functional/ PushBackControllerTest.php, line 15
Class
- PushBackControllerTest
- Push back controller tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testPushBackNonExistingJob() {
if (!empty($this->smartlingPluginProviderSettings)) {
$translator = $this
->setUpSmartlingProviderSettings($this->smartlingPluginProviderSettings);
$job = $this
->requestTranslationForNode($this->testNodeId, $this->targetLanguage, $translator);
$fileName = $job
->getTranslatorPlugin()
->getFileName($job);
$this
->checkGeneratedFile($fileName, $this->testNodeTitle);
// Try to push back un-existing job.
$this
->drupalGet("tmgmt-smartling-callback/100500", [
'query' => [
'fileUri' => $fileName,
'locale' => 'fr-FR',
],
]);
$this
->assertResponse(404);
}
else {
$this
->fail("Smartling settings file for simpletests not found.");
}
}