Skip to content
Snippets Groups Projects
Commit 3aaeda4b authored by catch's avatar catch
Browse files

Issue #3522970 by longwave, smustgrave: Remove unused BrowserTestBase::$originalContainer

(cherry picked from commit 9a2e10ea)
parent afa839f1
No related branches found
No related tags found
1 merge request!12357Issue #3529639 by mradcliffe, smustgrave, solomon.yifru: replacing a depricated css
Pipeline #509126 canceled
......@@ -599,7 +599,7 @@ protected function installParameters() {
];
// If we only have one db driver available, we cannot set the driver.
if (count($this->getDatabaseTypes()) == 1) {
if (count(Database::getDriverList()->getInstallableList()) == 1) {
unset($parameters['forms']['install_settings_form']['driver']);
}
return $parameters;
......@@ -730,27 +730,4 @@ protected function prepareEnvironment() {
$callbacks = [];
}
/**
* Returns all supported database driver installer objects.
*
* This wraps DatabaseDriverList::getInstallableList() for use without a
* current container.
*
* @return \Drupal\Core\Database\Install\Tasks[]
* An array of available database driver installer objects.
*/
protected function getDatabaseTypes() {
if (isset($this->originalContainer) && $this->originalContainer) {
\Drupal::setContainer($this->originalContainer);
}
$database_types = [];
foreach (Database::getDriverList()->getInstallableList() as $name => $driver) {
$database_types[$name] = $driver->getInstallTasks();
}
if (isset($this->originalContainer) && $this->originalContainer) {
\Drupal::unsetContainer();
}
return $database_types;
}
}
......@@ -172,16 +172,6 @@ abstract class BrowserTestBase extends TestCase {
*/
protected $originalShutdownCallbacks = [];
/**
* The original container.
*
* Move this to \Drupal\Core\Test\FunctionalTestSetupTrait once TestBase no
* longer provides the same value.
*
* @var \Symfony\Component\DependencyInjection\ContainerInterface
*/
protected $originalContainer;
/**
* {@inheritdoc}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment