You are here

protected function LingotekNodeBulkFormWithContentModerationTest::setUp in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::setUp()
  2. 3.4.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::setUp()
  3. 3.6.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::setUp()
  4. 3.7.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::setUp()
  5. 3.8.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::setUp()

Overrides LingotekNodeBulkFormTest::setUp

File

tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php, line 32

Class

LingotekNodeBulkFormWithContentModerationTest
Tests the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->drupalPlaceBlock('page_title_block', [
    'region' => 'content',
    'weight' => -5,
  ]);
  $this
    ->drupalPlaceBlock('local_tasks_block', [
    'region' => 'content',
    'weight' => -10,
  ]);

  // Enable content moderation.
  $workflow = $this
    ->createEditorialWorkflow();
  $this
    ->enableModerationThroughUI('article');
  $this
    ->addReviewStateToEditorialWorkflow();
  $this
    ->saveLingotekContentTranslationSettings([
    'node' => [
      'article' => [
        'profiles' => 'automatic',
        'fields' => [
          'title' => 1,
          'body' => 1,
        ],
        'moderation' => [
          'upload_status' => 'published',
          'download_transition' => 'request_review',
        ],
      ],
    ],
  ]);
}