You are here

public function LocaleExportTest::testExportTranslationTemplateFile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/Tests/LocaleExportTest.php \Drupal\locale\Tests\LocaleExportTest::testExportTranslationTemplateFile()

Test exportation of translation template file.

File

core/modules/locale/src/Tests/LocaleExportTest.php, line 120
Contains \Drupal\locale\Tests\LocaleExportTest.

Class

LocaleExportTest
Tests the exportation of locale files.

Namespace

Drupal\locale\Tests

Code

public function testExportTranslationTemplateFile() {

  // 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
    ->drupalPostForm('admin/config/regional/translate/export', array(), t('Export'));

  // Ensure we have a translation file.
  $this
    ->assertRaw('# LANGUAGE translation of PROJECT', 'Exported translation template file.');
}