function DisplayTest::testTranslationSetting
Same name in other branches
- 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()
- 11.x 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 419
Class
- DisplayTest
- Tests the basic display plugin.
Namespace
Drupal\Tests\views\Functional\PluginCode
public function testTranslationSetting() {
\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.