public function LocaleConfigSubscriberTest::testDeleteTranslation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php \Drupal\locale\Tests\LocaleConfigSubscriberTest::testDeleteTranslation()
Tests deleting translations of shipped configuration.
1 method overrides LocaleConfigSubscriberTest::testDeleteTranslation()
- LocaleConfigSubscriberForeignTest::testDeleteTranslation in core/
modules/ locale/ src/ Tests/ LocaleConfigSubscriberForeignTest.php - Tests deleting a translation override.
File
- core/
modules/ locale/ src/ Tests/ LocaleConfigSubscriberTest.php, line 154 - Contains \Drupal\locale\Tests\LocaleConfigSubscriberTest.
Class
- LocaleConfigSubscriberTest
- Tests that shipped configuration translations are updated correctly.
Namespace
Drupal\locale\TestsCode
public function testDeleteTranslation() {
$config_name = 'locale_test.translation';
$this
->deleteLanguageOverride($config_name, 'test', 'English test', 'de');
// Instead of deleting the translation, we need to keep a translation with
// the source value and mark it as customized to prevent the deletion being
// reverted by importing community translations.
$this
->assertTranslation($config_name, 'English test', 'de');
}