function InstallerTranslationTest::setUpSettings
Same name in other branches
- 9 core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationTest::setUpSettings()
- 10 core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationTest::setUpSettings()
- 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php \Drupal\FunctionalTests\Installer\InstallerTranslationTest::setUpSettings()
Overrides InstallerTestBase::setUpSettings
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerTranslationTest.php, line 51
Class
- InstallerTranslationTest
- Installs Drupal in German and checks resulting site.
Namespace
Drupal\FunctionalTests\InstallerCode
protected function setUpSettings() {
// We are creating a table here to force an error in the installer because
// it will try and create the drupal_install_test table as this is part of
// the standard database tests performed by the installer in
// Drupal\Core\Database\Install\Tasks.
Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)');
parent::setUpSettings();
// Ensure that the error message translation is working.
$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/docs/8/install">Installationshandbuch</a>, oder kontaktieren Sie Ihren Hosting-Anbieter.');
$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.');
// Now do it successfully.
Database::getConnection('default')->query('DROP TABLE {drupal_install_test}');
parent::setUpSettings();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.