You are here

public function LingotekNodeBulkTranslationTest::testNodeNotMarkedAsEditedIfNotUploaded in Lingotek Translation 3.8.x

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

Tests that the EDITED status is not assigned if the content is not uploaded.

File

tests/src/Functional/LingotekNodeBulkTranslationTest.php, line 360

Class

LingotekNodeBulkTranslationTest
Tests translating a node using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testNodeNotMarkedAsEditedIfNotUploaded() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Add two languages.
  ConfigurableLanguage::createFromLangcode('de')
    ->setThirdPartySetting('lingotek', 'locale', 'de_AT')
    ->save();

  // Create a node.
  $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]'] = 'manual';
  $this
    ->saveAndPublishNodeForm($edit);
  $this
    ->goToContentBulkManagementForm();

  // I can init the upload of content.
  $this
    ->assertLingotekUploadLink();

  // Edit the node.
  $edit = [];
  $edit['title[0][value]'] = 'Llamas are cool EDITED';
  $this
    ->saveAndKeepPublishedNodeForm($edit, 1);
  $this
    ->goToContentBulkManagementForm();
  $this
    ->assertSourceStatus('EN', Lingotek::STATUS_UNTRACKED);
}