You are here

public function LingotekNodeTranslationDownloadStatusTest::testNodeTargetDownloadPublishedStatusTranslation in Lingotek Translation 3.0.x

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

Tests that a node can be translated and set to published based on the lingotek setting.

File

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

Class

LingotekNodeTranslationDownloadStatusTest
Tests translating a node.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testNodeTargetDownloadPublishedStatusTranslation() {
  $this
    ->drupalGet('admin/lingotek/settings');
  $edit = [
    'target_download_status' => 'published',
  ];
  $this
    ->submitForm($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');
}