Mercurial > hg > isophonics-drupal-site
annotate 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 |
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\Database\Database; |
Chris@16 | 6 |
Chris@16 | 7 /** |
Chris@16 | 8 * Tests the installer with database errors. |
Chris@16 | 9 * |
Chris@16 | 10 * @group Installer |
Chris@16 | 11 */ |
Chris@16 | 12 class InstallerDatabaseErrorMessagesTest extends InstallerTestBase { |
Chris@16 | 13 |
Chris@16 | 14 /** |
Chris@16 | 15 * {@inheritdoc} |
Chris@16 | 16 */ |
Chris@16 | 17 protected function setUpSettings() { |
Chris@16 | 18 // We are creating a table here to force an error in the installer because |
Chris@16 | 19 // it will try and create the drupal_install_test table as this is part of |
Chris@16 | 20 // the standard database tests performed by the installer in |
Chris@16 | 21 // Drupal\Core\Database\Install\Tasks. |
Chris@16 | 22 Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NULL)'); |
Chris@16 | 23 parent::setUpSettings(); |
Chris@16 | 24 } |
Chris@16 | 25 |
Chris@16 | 26 /** |
Chris@16 | 27 * {@inheritdoc} |
Chris@16 | 28 */ |
Chris@16 | 29 protected function setUpSite() { |
Chris@16 | 30 // This step should not appear as we had a failure on the settings screen. |
Chris@16 | 31 } |
Chris@16 | 32 |
Chris@16 | 33 /** |
Chris@16 | 34 * Verifies that the error message in the settings step is correct. |
Chris@16 | 35 */ |
Chris@16 | 36 public function testSetUpSettingsErrorMessage() { |
Chris@16 | 37 $this->assertRaw('<ul><li>Failed to <strong>CREATE</strong> a test table'); |
Chris@16 | 38 } |
Chris@16 | 39 |
Chris@16 | 40 } |