You are here

protected function LingotekTestBase::saveLingotekConfigTranslationSettings in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveLingotekConfigTranslationSettings()
  2. 4.0.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveLingotekConfigTranslationSettings()
  3. 3.0.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveLingotekConfigTranslationSettings()
  4. 3.1.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveLingotekConfigTranslationSettings()
  5. 3.2.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveLingotekConfigTranslationSettings()
  6. 3.3.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveLingotekConfigTranslationSettings()
  7. 3.4.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.

78 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 715

Class

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

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function saveLingotekConfigTranslationSettings($settings) {
  $edit = [];
  foreach ($settings as $entity_type => $profile) {
    $edit['table[' . $entity_type . '][enabled]'] = 1;
    $edit['table[' . $entity_type . '][profile]'] = $profile;
  }
  $this
    ->drupalPostForm('admin/lingotek/settings', $edit, 'Save', [], 'lingoteksettings-tab-configuration-form');
}