class TestSiteMultilingualInstallTestScript
Setup file used by TestSiteApplicationTest.
Hierarchy
- class \Drupal\TestSite\TestSiteMultilingualInstallTestScript implements \Drupal\TestSite\TestSetupInterface, \Drupal\TestSite\TestPreinstallInterface
Expanded class hierarchy of TestSiteMultilingualInstallTestScript
See also
\Drupal\Tests\Scripts\TestSiteApplicationTest
File
- 
              core/tests/ Drupal/ TestSite/ TestSiteMultilingualInstallTestScript.php, line 14 
Namespace
Drupal\TestSiteView source
class TestSiteMultilingualInstallTestScript implements TestSetupInterface, TestPreinstallInterface {
  
  /**
   * {@inheritdoc}
   */
  public function preinstall($db_prefix, $site_directory) {
    // Place a custom local translation in the translations directory.
    mkdir($site_directory . '/files/translations', 0777, TRUE);
    file_put_contents($site_directory . '/files/translations/drupal-8.0.0.fr.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Enregistrer et continuer\"");
  }
  
  /**
   * {@inheritdoc}
   */
  public function setup() {
    \Drupal::service('module_installer')->install([
      'test_page_test',
    ]);
  }
}Members
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title | 
|---|---|---|---|---|
| TestSiteMultilingualInstallTestScript::preinstall | public | function | Overrides TestPreinstallInterface::preinstall | |
| TestSiteMultilingualInstallTestScript::setup | public | function | Overrides TestSetupInterface::setup | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
