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