Chris@0: siteDirectory . '/files/translations', 0777, TRUE); Chris@0: file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); Chris@0: Chris@0: // The unrouted URL assembler does not exist at this point, so we build the Chris@0: // URL ourselves. Chris@0: $this->drupalGet($GLOBALS['base_url'] . '/core/install.php' . '?langcode=' . $this->langcode); Chris@0: Chris@0: // The language should have been automatically detected, all following Chris@0: // screens should be translated already. Chris@0: $elements = $this->xpath('//input[@type="submit"]/@value'); Chris@0: $this->assertEqual((string) current($elements), 'Save and continue de'); Chris@0: $this->translations['Save and continue'] = 'Save and continue de'; Chris@0: Chris@0: // Check the language direction. Chris@0: $direction = (string) current($this->xpath('/html/@dir')); Chris@0: $this->assertEqual($direction, 'ltr'); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: protected function setUpLanguage() { Chris@0: // The language was was preset by passing a query parameter in the URL, so Chris@0: // no explicit language selection is necessary. Chris@0: } Chris@0: Chris@0: /** Chris@0: * Verifies the expected behaviors of the installation result. Chris@0: */ Chris@0: public function testInstaller() { Chris@0: $this->assertUrl('user/1'); Chris@0: $this->assertResponse(200); Chris@0: Chris@0: // Verify German was configured but not English. Chris@0: $this->drupalGet('admin/config/regional/language'); Chris@0: $this->assertText('German'); Chris@0: $this->assertNoText('English'); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Returns the string for the test .po file. Chris@0: * Chris@0: * @param string $langcode Chris@0: * The language code. Chris@0: * @return string Chris@0: * Contents for the test .po file. Chris@0: */ Chris@0: protected function getPo($langcode) { Chris@0: return <<