You are here

private function CommentFullViewFiltersFieldsTest::enableTranslation in Translation Views 8

Change language settings for entity types.

Parameters

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

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

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

File

tests/src/Functional/CommentFullViewFiltersFieldsTest.php, line 92

Class

CommentFullViewFiltersFieldsTest
Tests for fields, filters and sorting for comment entity.

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,
  ], t('Save configuration'));
  \Drupal::entityTypeManager()
    ->clearCachedDefinitions();
}