You are here

private function TranslationOperationTargetLanguageTest::enableTranslation in Translation Views 8

Change language settings for entity types.

Parameters

string $category: Entity category (e.g. node).

string $subcategory: Entity subcategory (e.g. article).

1 call to TranslationOperationTargetLanguageTest::enableTranslation()
TranslationOperationTargetLanguageTest::setUp in tests/src/Functional/TranslationOperationTargetLanguageTest.php

File

tests/src/Functional/TranslationOperationTargetLanguageTest.php, line 109

Class

TranslationOperationTargetLanguageTest
Class TranslationOperationTargetLanguageTest.

Namespace

Drupal\Tests\translation_views\Functional

Code

private function enableTranslation($category, $subcategory) {
  $this
    ->drupalPostForm('admin/config/regional/content-language', [
    "entity_types[{$category}]" => 1,
    "settings[{$category}][{$subcategory}][translatable]" => 1,
    "settings[{$category}][{$subcategory}][settings][language][language_alterable]" => 1,
  ], 'Save configuration');
  \Drupal::entityTypeManager()
    ->clearCachedDefinitions();
}