function LocaleExportTest::testExportTranslationTemplateFile

Test exportation of translation template file.

File

drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleExportTest.php, line 120
Definition of Drupal\locale\Tests\LocaleExportTest.

Class

LocaleExportTest
Tests for the export of translation files.

Namespace

Drupal\locale\Tests

Code

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

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