public function ContextTest::testContextSendingByCron in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Functional/ContextTest.php \Drupal\Tests\tmgmt_smartling\Functional\ContextTest::testContextSendingByCron()
Test context sending by cron.
File
- tests/
src/ Functional/ ContextTest.php, line 48
Class
- ContextTest
- Context tests.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
public function testContextSendingByCron() {
if (!empty($this->smartlingPluginProviderSettings)) {
$translator = $this
->setUpSmartlingProviderSettings($this->smartlingPluginProviderSettings);
$job = $this
->requestTranslationForNode($this->testNodeId, $this->targetLanguage, $translator);
$fileName = $job
->getTranslatorPlugin()
->getFileName($job);
$this
->cronRun();
$this
->drupalGet('admin/reports/dblog');
$this
->assertRaw('We are about to switch user');
$this
->assertRaw('User was successfully switched');
$this
->assertRaw(t('Context upload for file @filename completed successfully.', [
'@filename' => $fileName,
]));
}
else {
$this
->fail("Smartling settings file for simpletests not found.");
}
}