function ConfigTranslationUiTest::testAlterInfo
Same name in other branches
- 8.9.x core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testAlterInfo()
- 10 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testAlterInfo()
- 11.x core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testAlterInfo()
Tests the config_translation_info_alter() hook.
File
-
core/
modules/ config_translation/ tests/ src/ Functional/ ConfigTranslationUiTest.php, line 908
Class
- ConfigTranslationUiTest
- Translate settings and entities to various languages.
Namespace
Drupal\Tests\config_translation\FunctionalCode
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 if the translation page does not have the altered out settings.
$this->drupalGet('admin/config/people/accounts/translate/fr/add');
$this->assertSession()
->pageTextContains('Name');
$this->assertSession()
->pageTextNotContains('Account cancellation confirmation');
$this->assertSession()
->pageTextNotContains('Password recovery');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.