You are here

public function LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation 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::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  2. 4.0.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  3. 3.0.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  4. 3.1.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  5. 3.2.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  6. 3.3.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  7. 3.4.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  8. 3.5.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  9. 3.7.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()
  10. 3.8.x tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadSameAsSourcePublishedStatusTranslation()

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 117

Class

LingotekNodeTranslationDownloadStatusTest
Tests translating a node.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testNodeTargetDownloadSameAsSourcePublishedStatusTranslation() {
  $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::PUBLISHED);

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