You are here

protected function LingotekTestBase::configureContentModeration in Lingotek Translation 3.6.x

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

Configure content moderation.

Parameters

string $workflow_id: The workflow id to be configured.

array $entities_map: The entities and bundles map that wants to be enabled for a given workflow. Array in the form: [entity_type => [bundle1, bundle2]].

4 calls to LingotekTestBase::configureContentModeration()
LingotekNodeCohesionRepeaterTranslationTest::setUp in tests/src/Functional/LingotekNodeCohesionRepeaterTranslationTest.php
LingotekNodeCohesionTranslationTest::setUp in tests/src/Functional/LingotekNodeCohesionTranslationTest.php
LingotekNodeContentModerationTranslationTest::setUp in tests/src/Functional/LingotekNodeContentModerationTranslationTest.php
LingotekNodeParagraphsTranslationTest::setUp in tests/src/Functional/LingotekNodeParagraphsTranslationTest.php

File

tests/src/Functional/LingotekTestBase.php, line 405

Class

LingotekTestBase
Base class for Lingotek test. Performs authorization of the account.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function configureContentModeration($workflow_id, array $entities_map) {
  foreach ($entities_map as $entity_type_id => $bundles) {
    $edit = [];
    foreach ($bundles as $bundle) {
      $edit["bundles[{$bundle}]"] = $bundle;
    }
    $this
      ->drupalPostForm("/admin/config/workflow/workflows/manage/{$workflow_id}/type/{$entity_type_id}", $edit, 'Save');
  }
}