You are here

protected function LingotekTestBase::saveLingotekConfigTranslationSettings in Lingotek Translation 8.2

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

Save Lingotek configuration translation settings.

Example:

$this
  ->saveLingotekConfigTranslationSettings([
  'node_type' => 'manual',
  'node_fields' => 'automatic',
]);

Parameters

array $settings: The settings we want to save.

73 calls to LingotekTestBase::saveLingotekConfigTranslationSettings()
ChineseBulkTranslationTest::setUp in tests/src/Functional/ChineseBulkTranslationTest.php
LingotekConfigBulkFormTest::setUp in tests/src/Functional/Form/LingotekConfigBulkFormTest.php
LingotekConfigDependenciesTest::testExportingConfigDependencies in tests/src/Functional/LingotekConfigDependenciesTest.php
LingotekConfigEntityBulkProfileTest::setUp in tests/src/Functional/LingotekConfigEntityBulkProfileTest.php
LingotekConfigEntityStatusDownloadTargetTest::setUp in tests/src/Functional/LingotekConfigEntityStatusDownloadTargetTest.php

... See full list

File

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

Class

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

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function saveLingotekConfigTranslationSettings($settings) {

  // ToDo: Remove this when 8.5.x is not supported anymore.
  $this
    ->drupalGet('admin/lingotek/settings');
  $edit = [];
  foreach ($settings as $entity_type => $profile) {
    $edit['table[' . $entity_type . '][enabled]'] = 1;
    $edit['table[' . $entity_type . '][profile]'] = $profile;
  }

  // ToDo: Remove this when 8.5.x is not supported anymore and replace with
  // $this->drupalPostForm('admin/lingotek/settings', $edit, 'Save', [], 'lingoteksettings-tab-configuration-form');
  $this
    ->submitForm($edit, 'Save', 'lingoteksettings-tab-configuration-form');
}