function InstallerLanguageTrait::getTranslationFileContents

Same name and namespace in other branches
  1. main core/tests/Drupal/Tests/Traits/Core/Locale/InstallerLanguageTrait.php \Drupal\Tests\Traits\Core\Locale\InstallerLanguageTrait::getTranslationFileContents()

Returns the contents of the translation file.

This method should be overridden by the test class to provide a translation file that will be used during the installation.

Return value

string The contents of the translation file.

1 method overrides InstallerLanguageTrait::getTranslationFileContents()
HelpTopicTranslatedTestBase::getTranslationFileContents in core/modules/help/tests/src/Functional/HelpTopicTranslatedTestBase.php
Returns the contents of the translation file.

File

core/tests/Drupal/Tests/Traits/Core/Locale/InstallerLanguageTrait.php, line 29

Class

InstallerLanguageTrait
A trait to install Drupal in a specific language.

Namespace

Drupal\Tests\Traits\Core\Locale

Code

protected function getTranslationFileContents() : string {
  return <<<PO
  msgid ""
  msgstr ""
  
  PO;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.