Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
|
@ -9,10 +9,10 @@ use Drupal\Component\Utility\SafeMarkup;
|
|||
use Drupal\Core\Database\Database;
|
||||
use Drupal\Core\Config\ConfigImporter;
|
||||
use Drupal\Core\Config\StorageComparer;
|
||||
use Drupal\Core\Database\ConnectionNotDefinedException;
|
||||
use Drupal\Core\Config\StorageInterface;
|
||||
use Drupal\Core\Site\Settings;
|
||||
use Drupal\Core\StreamWrapper\PublicStream;
|
||||
use Drupal\Core\Test\TestDatabase;
|
||||
use Drupal\Core\Utility\Error;
|
||||
use Drupal\Tests\RandomGeneratorTrait;
|
||||
use Drupal\Tests\SessionTestTrait;
|
||||
|
|
@ -510,26 +510,7 @@ abstract class TestBase {
|
|||
* The database connection to use for inserting assertions.
|
||||
*/
|
||||
public static function getDatabaseConnection() {
|
||||
// Check whether there is a test runner connection.
|
||||
// @see run-tests.sh
|
||||
// @todo Convert Simpletest UI runner to create + use this connection, too.
|
||||
try {
|
||||
$connection = Database::getConnection('default', 'test-runner');
|
||||
}
|
||||
catch (ConnectionNotDefinedException $e) {
|
||||
// Check whether there is a backup of the original default connection.
|
||||
// @see TestBase::prepareEnvironment()
|
||||
try {
|
||||
$connection = Database::getConnection('default', 'simpletest_original_default');
|
||||
}
|
||||
catch (ConnectionNotDefinedException $e) {
|
||||
// If TestBase::prepareEnvironment() or TestBase::restoreEnvironment()
|
||||
// failed, the test-specific database connection does not exist
|
||||
// yet/anymore, so fall back to the default of the (UI) test runner.
|
||||
$connection = Database::getConnection('default', 'default');
|
||||
}
|
||||
}
|
||||
return $connection;
|
||||
return TestDatabase::getConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Reference in a new issue