public function ConfigTranslationUiTest::testAlterInfo in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php \Drupal\config_translation\Tests\ConfigTranslationUiTest::testAlterInfo()
Tests the config_translation_info_alter() hook.
File
- core/
modules/ config_translation/ src/ Tests/ ConfigTranslationUiTest.php, line 814 - Contains \Drupal\config_translation\Tests\ConfigTranslationUiTest.
Class
- ConfigTranslationUiTest
- Translate settings and entities to various languages.
Namespace
Drupal\config_translation\TestsCode
public function testAlterInfo() {
$this
->drupalLogin($this->adminUser);
$this->container
->get('state')
->set('config_translation_test_config_translation_info_alter', TRUE);
$this->container
->get('plugin.manager.config_translation.mapper')
->clearCachedDefinitions();
// Check out if the translation page has the altered in settings.
$this
->drupalGet('admin/config/system/site-information/translate/fr/add');
$this
->assertText(t('Feed channel'));
$this
->assertText(t('Feed description'));
// Check if the translation page does not have the altered out settings.
$this
->drupalGet('admin/config/people/accounts/translate/fr/add');
$this
->assertText(t('Name'));
$this
->assertNoText(t('Account cancellation confirmation'));
$this
->assertNoText(t('Password recovery'));
}