public function LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadPublishedStatusTranslation in Lingotek Translation 8
Tests that a node can be translated and set to published based on the lingotek setting.
File
- src/
Tests/ LingotekNodeTranslationDownloadStatusTest.php, line 99
Class
- LingotekNodeTranslationDownloadStatusTest
- Tests translating a node.
Namespace
Drupal\lingotek\TestsCode
public function testNodeTargetDownloadPublishedStatusTranslation() {
$edit = [
'target_download_status' => 'published',
];
$this
->drupalPostForm('admin/lingotek/settings', $edit, 'Save', [], [], 'lingoteksettings-tab-preferences-form');
// Assert the settings are saved successfully.
$this
->assertOptionSelected('edit-target-download-status', 'published');
// Create a node and complete the translation with Lingotek.
$this
->createAndDownloadANodeTranslation(self::UNPUBLISHED);
// Ensure that there is one and only one published content.
$this
->assertText('Published');
$this
->assertUniqueText('Published');
}