public function LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation in Lingotek Translation 8
Tests that a node can be translated as published when using same as source as the lingotek setting.
File
- src/
Tests/ LingotekNodeTranslationDownloadStatusTest.php, line 118
Class
- LingotekNodeTranslationDownloadStatusTest
- Tests translating a node.
Namespace
Drupal\lingotek\TestsCode
public function testNodeTargetDownloadSameAsSourcePublishedStatusTranslation() {
$edit = [
'target_download_status' => 'same-as-source',
];
$this
->drupalPostForm('admin/lingotek/settings', $edit, 'Save', [], [], 'lingoteksettings-tab-preferences-form');
// Assert the settings are saved successfully.
$this
->assertOptionSelected('edit-target-download-status', 'same-as-source');
// Create a node and complete the translation with Lingotek.
$this
->createAndDownloadANodeTranslation(self::PUBLISHED);
// Ensure that there is more than one published content.
$this
->assertNoText('Not published');
$this
->assertNoUniqueText('Published');
}