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