You are here

public function LingotekContentModerationTest::testUpdateEntityWithAutomaticProfileButNotInUploadState in Lingotek Translation 3.6.x

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

Tests updating an entity with automatic profile but not in upload state is not uploaded.

File

tests/src/Functional/LingotekContentModerationTest.php, line 156

Class

LingotekContentModerationTest
Tests setting up the integration with content moderation.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testUpdateEntityWithAutomaticProfileButNotInUploadState() {
  $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
    ->saveAsNewDraftNodeForm($edit, 'article');
  $this
    ->assertText('Article Llamas are cool has been created.');
  $this
    ->editAsRequestReviewNodeForm('/node/1/edit', $edit);
  $this
    ->assertText('Article Llamas are cool has been updated.');
  $this
    ->assertNoText('Llamas are cool was updated and sent to Lingotek successfully.');
}