public function PushBackControllerTest::testPushBackExistingJobWithoutLocaleAndFileUri 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::testPushBackExistingJobWithoutLocaleAndFileUri()
Push back existing job without parameters.
File
- tests/
src/ Functional/ PushBackControllerTest.php, line 39
Class
- PushBackControllerTest
- Push back controller tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testPushBackExistingJobWithoutLocaleAndFileUri() {
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 existing job without locale and fileUri parameters.
$this
->drupalGet("tmgmt-smartling-callback/{$job->id()}");
$this
->assertResponse(404);
}
else {
$this
->fail("Smartling settings file for simpletests not found.");
}
}