InstallerExistingConfigTest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Verifies that installing from existing configuration works.
  5. *
  6. * @group Installer
  7. */
  8. class InstallerExistingConfigTest extends InstallerExistingConfigTestBase {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. protected function setUpLanguage() {
  13. // Place a custom local translation in the translations directory.
  14. mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
  15. file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.fr.po', "msgid \"\"\nmsgstr \"\"\nmsgid \"Save and continue\"\nmsgstr \"Enregistrer et continuer\"");
  16. parent::setUpLanguage();
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function setUpSettings() {
  22. // The configuration is from a site installed in French.
  23. // So after selecting the profile the installer detects that the site must
  24. // be installed in French, thus we change the button translation.
  25. $this->translations['Save and continue'] = 'Enregistrer et continuer';
  26. parent::setUpSettings();
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. protected function getConfigTarball() {
  32. return __DIR__ . '/../../../fixtures/config_install/testing_config_install.tar.gz';
  33. }
  34. }