function DisplayTest::testTranslationSetting
Same name in other branches
- 9 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::testTranslationSetting()
- 8.9.x core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::testTranslationSetting()
- 10 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::testTranslationSetting()
Tests translation rendering settings based on entity translatability.
File
-
core/
modules/ views/ tests/ src/ Functional/ Plugin/ DisplayTest.php, line 440
Class
- DisplayTest
- Tests the basic display plugin.
Namespace
Drupal\Tests\views\Functional\PluginCode
public function testTranslationSetting() : void {
\Drupal::service('module_installer')->install([
'file',
]);
// By default there should be no language settings.
$this->checkTranslationSetting();
\Drupal::service('module_installer')->install([
'language',
]);
// Enabling the language module should not make a difference.
$this->checkTranslationSetting();
// Making the site multilingual should let translatable entity types support
// translation rendering.
ConfigurableLanguage::createFromLangcode('it')->save();
$this->checkTranslationSetting(TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.