protected function FieldEncryptTestBase::setTranslationSettings in Field Encryption 8.2
Same name and namespace in other branches
- 3.0.x tests/src/Functional/FieldEncryptTestBase.php \Drupal\Tests\field_encrypt\Functional\FieldEncryptTestBase::setTranslationSettings()
Set up translation settings for content translation test.
1 call to FieldEncryptTestBase::setTranslationSettings()
- FieldEncryptTest::testEncryptFieldTranslation in tests/
src/ Functional/ FieldEncryptTest.php - Test encrypting fields with translations.
File
- tests/
src/ Functional/ FieldEncryptTestBase.php, line 188
Class
- FieldEncryptTestBase
- Base test class for field_encrypt.
Namespace
Drupal\Tests\field_encrypt\FunctionalCode
protected function setTranslationSettings() {
// Set up extra language.
ConfigurableLanguage::createFromLangcode('fr')
->save();
// Enable translation for the current entity type and ensure the change is
// picked up.
\Drupal::service('content_translation.manager')
->setEnabled('node', 'page', TRUE);
drupal_static_reset();
$this->entityTypeManager
->clearCachedDefinitions();
\Drupal::service('router.builder')
->rebuild();
$this
->rebuildContainer();
}