3 namespace Drupal\FunctionalTests\Installer;
5 use Drupal\Core\Language\LanguageManager;
8 * Verifies that the installer language list combines local and remote languages.
12 class InstallerLanguagePageTest extends InstallerTestBase {
15 * Installer step: Select language.
17 protected function setUpLanguage() {
18 // Place a custom local translation in the translations directory.
19 mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
20 touch($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po');
22 // Check that all predefined languages show up with their native names.
23 $this->visitInstaller();
24 foreach (LanguageManager::getStandardLanguageList() as $langcode => $names) {
25 $this->assertOption('edit-langcode', $langcode);
26 $this->assertRaw('>' . $names[1] . '<');
29 // Check that our custom one shows up with the file name indicated language.
30 $this->assertOption('edit-langcode', 'xoxo');
31 $this->assertRaw('>xoxo<');
33 parent::setUpLanguage();
37 * Confirms that the installation succeeded.
39 public function testInstalled() {
40 $this->assertUrl('user/1');
41 $this->assertResponse(200);