Chris@16: root . '/core/includes/install.core.inc'; Chris@16: $version = _install_get_version_info(\Drupal::VERSION); Chris@16: return $version['major'] . '.0.0'; Chris@16: } Chris@16: Chris@16: /** Chris@16: * {@inheritdoc} Chris@16: */ Chris@16: protected function installParameters() { Chris@16: $parameters = parent::installParameters(); Chris@16: // Install Drupal in German. Chris@16: $parameters['parameters']['langcode'] = 'de'; Chris@16: // Create a po file so we don't attempt to download one from Chris@16: // localize.drupal.org and to have a test translation that will not change. Chris@16: \Drupal::service('file_system')->mkdir($this->publicFilesDirectory . '/translations', NULL, TRUE); Chris@16: $contents = <<getVersionStringToTest(); Chris@16: file_put_contents($this->publicFilesDirectory . "/translations/drupal-{$version}.de.po", $contents); Chris@16: return $parameters; Chris@16: } Chris@16: Chris@16: /** Chris@16: * Tests that the expected translated text appears on the login screen. Chris@16: */ Chris@16: public function testInstallerTranslations() { Chris@16: $this->drupalGet('user/login'); Chris@16: $this->assertSession()->responseContains('Geben sie das Passwort für ihren Benutzernamen ein.'); Chris@16: } Chris@16: Chris@16: }