You are here

public function LingotekWorkbenchModerationTest::testDownloadWhenContentModerationWasSetupAfterLingotek in Lingotek Translation 3.8.x

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

File

tests/src/Functional/LingotekWorkbenchModerationTest.php, line 378

Class

LingotekWorkbenchModerationTest
Tests setting up the integration with workbench moderation.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testDownloadWhenContentModerationWasSetupAfterLingotek() {
  $edit = [];
  $edit['title[0][value]'] = 'Llamas are cool';
  $edit['body[0][value]'] = 'Llamas are very cool';
  $edit['langcode[0][value]'] = 'en';
  $edit['lingotek_translation_management[lingotek_translation_profile]'] = 'automatic';
  $this
    ->saveAndPublishNodeForm($edit, 'page');
  $this
    ->goToContentBulkManagementForm();

  // Request translation.
  $this
    ->clickLink('ES');
  $this
    ->enableModerationThroughUI('page', [
    'draft',
    'needs_review',
    'published',
  ], 'draft');
  $this
    ->goToContentBulkManagementForm();

  // Check translation.
  $this
    ->clickLink('ES');

  // Download translation.
  $this
    ->clickLink('ES');
  $this
    ->assertTargetStatus('ES', Lingotek::STATUS_CURRENT);
}