You are here

private function TranslationOperationsFieldPermissionsTest::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 TranslationOperationsFieldPermissionsTest::enableTranslation()
TranslationOperationsFieldPermissionsTest::setUp in tests/src/Functional/TranslationOperationsFieldPermissionsTest.php

File

tests/src/Functional/TranslationOperationsFieldPermissionsTest.php, line 93

Class

TranslationOperationsFieldPermissionsTest
Class TranslationOperationsFieldPermissionsTest.

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();
}