function LanguageNegotiationInfoTest::testConfigLangTypeAlterations
Same name in other branches
- 9 core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::testConfigLangTypeAlterations()
- 10 core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::testConfigLangTypeAlterations()
- 11.x core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::testConfigLangTypeAlterations()
Tests altering config of configurable language types.
File
-
core/
modules/ language/ tests/ src/ Functional/ LanguageNegotiationInfoTest.php, line 183
Class
- LanguageNegotiationInfoTest
- Tests alterations to language types/negotiation info.
Namespace
Drupal\Tests\language\FunctionalCode
public function testConfigLangTypeAlterations() {
// Default of config.
$test_type = LanguageInterface::TYPE_CONTENT;
$this->assertFalse($this->isLanguageTypeConfigurable($test_type), 'Language type is not configurable.');
// Editing config.
$edit = [
$test_type . '[configurable]' => TRUE,
];
$this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
$this->assertTrue($this->isLanguageTypeConfigurable($test_type), 'Language type is now configurable.');
// After installing another module, the config should be the same.
$this->drupalPostForm('admin/modules', [
'modules[test_module][enable]' => 1,
], t('Install'));
$this->assertTrue($this->isLanguageTypeConfigurable($test_type), 'Language type is still configurable.');
// After uninstalling the other module, the config should be the same.
$this->drupalPostForm('admin/modules/uninstall', [
'uninstall[test_module]' => 1,
], t('Uninstall'));
$this->assertTrue($this->isLanguageTypeConfigurable($test_type), 'Language type is still configurable.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.