diff --git a/core/tests/Drupal/Tests/Core/Scripts/TestSiteApplicationTest.php b/core/tests/Drupal/Tests/Core/Scripts/TestSiteApplicationTest.php index 3096f7f487..22f6a57320 100644 --- a/core/tests/Drupal/Tests/Core/Scripts/TestSiteApplicationTest.php +++ b/core/tests/Drupal/Tests/Core/Scripts/TestSiteApplicationTest.php @@ -233,9 +233,9 @@ public function testTearDownDbPrefixValidation() { protected function addTestDatabase($db_prefix) { $database = Database::convertDbUrlToConnectionInfo(getenv('SIMPLETEST_DB'), $this->root); $database['prefix'] = ['default' => $db_prefix]; - $key = __CLASS__ . $db_prefix; - Database::addConnectionInfo($key, 'default', $database); - return $key; + $target = __CLASS__ . $db_prefix; + Database::addConnectionInfo($target, 'default', $database); + return $target; } /** diff --git a/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php b/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php index 886787d928..645fb7fcb8 100644 --- a/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php +++ b/core/tests/Drupal/Tests/Core/Scripts/TestSiteInstallCommandTest.php @@ -24,9 +24,18 @@ public function provideSetupFile() { $file = vfsStream::url('test/FixtureSetupFileClass.php'); $interface = TestSetupInterface::class; return [ - 'non-existing-file' => ['The file this-class-does-not-exist does not exist.', 'this-class-does-not-exist'], - 'no-class' => ['The file core/tests/fixtures/empty_file.php.module does not contain a class', 'core/tests/fixtures/empty_file.php.module'], - 'non-setup-class' => ["The class $class contained in $file needs to implement \\$interface", $file], + 'non-existing-file' => [ + 'The file this-class-does-not-exist does not exist.', + 'this-class-does-not-exist', + ], + 'no-class' => [ + 'The file core/tests/fixtures/empty_file.php.module does not contain a class', + 'core/tests/fixtures/empty_file.php.module', + ], + 'non-setup-class' => [ + "The class $class contained in $file needs to implement \\$interface", + $file, + ], ]; }