function LocaleExportTest::testExportTranslationTemplateFile
Same name in other branches
- 9 core/modules/locale/tests/src/Functional/LocaleExportTest.php \Drupal\Tests\locale\Functional\LocaleExportTest::testExportTranslationTemplateFile()
- 8.9.x core/modules/locale/tests/src/Functional/LocaleExportTest.php \Drupal\Tests\locale\Functional\LocaleExportTest::testExportTranslationTemplateFile()
- 10 core/modules/locale/tests/src/Functional/LocaleExportTest.php \Drupal\Tests\locale\Functional\LocaleExportTest::testExportTranslationTemplateFile()
Tests exportation of translation template file.
File
-
core/
modules/ locale/ tests/ src/ Functional/ LocaleExportTest.php, line 133
Class
- LocaleExportTest
- Tests the exportation of locale files.
Namespace
Drupal\Tests\locale\FunctionalCode
public function testExportTranslationTemplateFile() : void {
// Load an admin page with JavaScript so _drupal_add_library() fires at
// least once and _locale_parse_js_file() gets to run at least once so that
// the locales_source table gets populated with something.
$this->drupalGet('admin/config/regional/language');
// Get the translation template file.
$this->drupalGet('admin/config/regional/translate/export');
$this->submitForm([], 'Export');
// Ensure we have a translation file.
$this->assertSession()
->pageTextContains('# LANGUAGE translation of PROJECT');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.