comparison core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.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\Database\Database;
6
7 /**
8 * Tests the installer with database errors.
9 *
10 * @group Installer
11 */
12 class InstallerDatabaseErrorMessagesTest extends InstallerTestBase {
13
14 /**
15 * {@inheritdoc}
16 */
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 NULL)');
23 parent::setUpSettings();
24 }
25
26 /**
27 * {@inheritdoc}
28 */
29 protected function setUpSite() {
30 // This step should not appear as we had a failure on the settings screen.
31 }
32
33 /**
34 * Verifies that the error message in the settings step is correct.
35 */
36 public function testSetUpSettingsErrorMessage() {
37 $this->assertRaw('<ul><li>Failed to <strong>CREATE</strong> a test table');
38 }
39
40 }