Mercurial > hg > isophonics-drupal-site
annotate core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@16 | 1 <?php |
Chris@16 | 2 |
Chris@16 | 3 namespace Drupal\FunctionalTests\Installer; |
Chris@16 | 4 |
Chris@16 | 5 use Drupal\Core\Language\LanguageManager; |
Chris@16 | 6 |
Chris@16 | 7 /** |
Chris@16 | 8 * Verifies that the installer language list combines local and remote languages. |
Chris@16 | 9 * |
Chris@16 | 10 * @group Installer |
Chris@16 | 11 */ |
Chris@16 | 12 class InstallerLanguagePageTest extends InstallerTestBase { |
Chris@16 | 13 |
Chris@16 | 14 /** |
Chris@16 | 15 * Installer step: Select language. |
Chris@16 | 16 */ |
Chris@16 | 17 protected function setUpLanguage() { |
Chris@16 | 18 // Place a custom local translation in the translations directory. |
Chris@17 | 19 mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); |
Chris@17 | 20 touch($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po'); |
Chris@16 | 21 |
Chris@16 | 22 // Check that all predefined languages show up with their native names. |
Chris@16 | 23 $this->visitInstaller(); |
Chris@16 | 24 foreach (LanguageManager::getStandardLanguageList() as $langcode => $names) { |
Chris@16 | 25 $this->assertOption('edit-langcode', $langcode); |
Chris@16 | 26 $this->assertRaw('>' . $names[1] . '<'); |
Chris@16 | 27 } |
Chris@16 | 28 |
Chris@16 | 29 // Check that our custom one shows up with the file name indicated language. |
Chris@16 | 30 $this->assertOption('edit-langcode', 'xoxo'); |
Chris@16 | 31 $this->assertRaw('>xoxo<'); |
Chris@16 | 32 |
Chris@16 | 33 parent::setUpLanguage(); |
Chris@16 | 34 } |
Chris@16 | 35 |
Chris@16 | 36 /** |
Chris@16 | 37 * Confirms that the installation succeeded. |
Chris@16 | 38 */ |
Chris@16 | 39 public function testInstalled() { |
Chris@16 | 40 $this->assertUrl('user/1'); |
Chris@16 | 41 $this->assertResponse(200); |
Chris@16 | 42 } |
Chris@16 | 43 |
Chris@16 | 44 } |