Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\FunctionalTests\Installer; | |
4 | |
5 use Drupal\Core\Language\LanguageManager; | |
6 | |
7 /** | |
8 * Verifies that the installer language list combines local and remote languages. | |
9 * | |
10 * @group Installer | |
11 */ | |
12 class InstallerLanguagePageTest extends InstallerTestBase { | |
13 | |
14 /** | |
15 * Installer step: Select language. | |
16 */ | |
17 protected function setUpLanguage() { | |
18 // Place a custom local translation in the translations directory. | |
19 mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); | |
20 touch(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po'); | |
21 | |
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] . '<'); | |
27 } | |
28 | |
29 // Check that our custom one shows up with the file name indicated language. | |
30 $this->assertOption('edit-langcode', 'xoxo'); | |
31 $this->assertRaw('>xoxo<'); | |
32 | |
33 parent::setUpLanguage(); | |
34 } | |
35 | |
36 /** | |
37 * Confirms that the installation succeeded. | |
38 */ | |
39 public function testInstalled() { | |
40 $this->assertUrl('user/1'); | |
41 $this->assertResponse(200); | |
42 } | |
43 | |
44 } |