You are here

protected function LingotekContentModerationSettingsTest::enableModerationThroughUI in Lingotek Translation 3.6.x

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

Enable moderation for a specified content type, using the UI.

Parameters

string $content_type_id: Machine name.

2 calls to LingotekContentModerationSettingsTest::enableModerationThroughUI()
LingotekContentModerationSettingsTest::testContentModerationSettings in tests/src/Functional/LingotekContentModerationSettingsTest.php
Tests that the content moderation settings are stored correctly.
LingotekContentModerationSettingsTest::testContentModerationStateEntityNotAvailableForLingotek in tests/src/Functional/LingotekContentModerationSettingsTest.php
Tests that the content moderation state entity cannot be enabled for Lingotek.

File

tests/src/Functional/LingotekContentModerationSettingsTest.php, line 182

Class

LingotekContentModerationSettingsTest
Tests setting up the integration with content moderation.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function enableModerationThroughUI($content_type_id) {
  $this
    ->drupalGet('/admin/config/workflow/workflows/manage/editorial/type/node');
  $this
    ->assertFieldByName("bundles[{$content_type_id}]");
  $edit["bundles[{$content_type_id}]"] = TRUE;
  $this
    ->drupalPostForm(NULL, $edit, t('Save'));
}