public function ConfigTranslationUiTest::testAlterInfo in Drupal 10
Same name and namespace in other branches
- 8 core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php \Drupal\Tests\config_translation\Functional\ConfigTranslationUiTest::testAlterInfo()
- 9 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 904
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');
}