Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
22 /** | 22 /** |
23 * {@inheritdoc} | 23 * {@inheritdoc} |
24 */ | 24 */ |
25 protected function setUpLanguage() { | 25 protected function setUpLanguage() { |
26 // Place a custom local translation in the translations directory. | 26 // Place a custom local translation in the translations directory. |
27 mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); | 27 mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE); |
28 file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); | 28 file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de')); |
29 | 29 |
30 parent::setUpLanguage(); | 30 parent::setUpLanguage(); |
31 | 31 |
32 // After selecting a different language than English, all following screens | 32 // After selecting a different language than English, all following screens |
33 // should be translated already. | 33 // should be translated already. |
46 protected function setUpSettings() { | 46 protected function setUpSettings() { |
47 // We are creating a table here to force an error in the installer because | 47 // We are creating a table here to force an error in the installer because |
48 // it will try and create the drupal_install_test table as this is part of | 48 // it will try and create the drupal_install_test table as this is part of |
49 // the standard database tests performed by the installer in | 49 // the standard database tests performed by the installer in |
50 // Drupal\Core\Database\Install\Tasks. | 50 // Drupal\Core\Database\Install\Tasks. |
51 Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NULL)'); | 51 Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)'); |
52 parent::setUpSettings(); | 52 parent::setUpSettings(); |
53 | 53 |
54 // Ensure that the error message translation is working. | 54 // Ensure that the error message translation is working. |
55 $this->assertRaw('Beheben Sie alle Probleme unten, um die Installation fortzusetzen. Informationen zur Konfiguration der Datenbankserver finden Sie in der <a href="https://www.drupal.org/getting-started/install">Installationshandbuch</a>, oder kontaktieren Sie Ihren Hosting-Anbieter.'); | 55 $this->assertRaw('Beheben Sie alle Probleme unten, um die Installation fortzusetzen. Informationen zur Konfiguration der Datenbankserver finden Sie in der <a href="https://www.drupal.org/getting-started/install">Installationshandbuch</a>, oder kontaktieren Sie Ihren Hosting-Anbieter.'); |
56 $this->assertRaw('<strong>CREATE</strong> ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl <em class="placeholder">CREATE TABLE {drupal_install_test} (id int NULL)</em> fehlgeschlagen.'); | 56 $this->assertRaw('<strong>CREATE</strong> ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl <em class="placeholder">CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)</em> fehlgeschlagen.'); |
57 | 57 |
58 // Now do it successfully. | 58 // Now do it successfully. |
59 Database::getConnection('default')->query('DROP TABLE {drupal_install_test}'); | 59 Database::getConnection('default')->query('DROP TABLE {drupal_install_test}'); |
60 parent::setUpSettings(); | 60 parent::setUpSettings(); |
61 } | 61 } |