function ConfigTranslationUiTest::testSingleLanguageUI
Same name in other branches
- 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testSingleLanguageUI()
- 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testSingleLanguageUI()
- 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testSingleLanguageUI()
Tests the single language existing.
File
-
core/
modules/ config_translation/ tests/ src/ Functional/ ConfigTranslationUiTest.php, line 878
Class
- ConfigTranslationUiTest
- Translate settings and entities to various languages.
Namespace
Drupal\Tests\config_translation\FunctionalCode
public function testSingleLanguageUI() {
$this->drupalLogin($this->adminUser);
// Delete French language
$this->drupalGet('admin/config/regional/language/delete/fr');
$this->submitForm([], 'Delete');
$this->assertSession()
->pageTextContains('The French (fr) language has been removed.');
// Change default language to Tamil.
$edit = [
'site_default_language' => 'ta',
];
$this->drupalGet('admin/config/regional/language');
$this->submitForm($edit, 'Save configuration');
$this->assertSession()
->pageTextContains('Configuration saved.');
// Delete English language
$this->drupalGet('admin/config/regional/language/delete/en');
$this->submitForm([], 'Delete');
$this->assertSession()
->pageTextContains('The English (en) language has been removed.');
// Visit account setting translation page, this should not
// throw any notices.
$this->drupalGet('admin/config/people/accounts/translate');
$this->assertSession()
->statusCodeEquals(200);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.