3 namespace Drupal\FunctionalTests\Installer;
5 use Drupal\Core\Database\Database;
8 * Tests the installer with database errors.
12 class InstallerDatabaseErrorMessagesTest extends InstallerTestBase {
17 protected function setUpSettings() {
18 // We are creating a table here to force an error in the installer because
19 // it will try and create the drupal_install_test table as this is part of
20 // the standard database tests performed by the installer in
21 // Drupal\Core\Database\Install\Tasks.
22 Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)');
23 parent::setUpSettings();
29 protected function setUpSite() {
30 // This step should not appear as we had a failure on the settings screen.
34 * Verifies that the error message in the settings step is correct.
36 public function testSetUpSettingsErrorMessage() {
37 $this->assertRaw('<ul><li>Failed to <strong>CREATE</strong> a test table');