You are here

public function LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  2. 4.0.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  3. 3.0.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  4. 3.1.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  5. 3.2.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  6. 3.3.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  7. 3.4.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  8. 3.5.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  9. 3.7.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()
  10. 3.8.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation()

Tests that a node can be translated as published when using same as source as the lingotek setting.

File

tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php, line 139

Class

LingotekNodeTranslationDownloadStatusTest
Tests translating a node.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testNodeTargetDownloadSameAsSourceUnpublishedStatusTranslation() {
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalGet('admin/lingotek/settings');
  $edit = [
    'target_download_status' => 'same-as-source',
  ];
  $this
    ->submitForm($edit, 'Save', 'lingoteksettings-tab-preferences-form');

  // Assert the settings are saved successfully.
  $assert_session
    ->optionExists('edit-target-download-status', 'same-as-source');

  // Create a node and complete the translation with Lingotek.
  $this
    ->createAndDownloadANodeTranslation(self::UNPUBLISHED);

  // Ensure that there is more than one unpublished content.
  $this
    ->assertNoText('Published');
  $this
    ->assertNoUniqueText('Not published');
}