
| Current Path : /var/www/html/stolberg/web/core/tests/Drupal/KernelTests/Core/Database/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/stolberg/web/core/tests/Drupal/KernelTests/Core/Database/DatabaseLegacyTest.php |
<?php
declare(strict_types=1);
namespace Drupal\KernelTests\Core\Database;
use Drupal\Core\Database\Database;
/**
* Legacy database tests.
*
* @group Database
* @group legacy
*/
class DatabaseLegacyTest extends DatabaseTestBase {
/**
* Tests deprecation of install.inc database driver functions.
*/
public function testDeprecatedInstallFunctions(): void {
include_once $this->root . '/core/includes/install.inc';
$this->expectDeprecation('drupal_detect_database_types() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use DatabaseDriverList::getList() instead. See https://www.drupal.org/node/3258175');
$this->expectDeprecation('drupal_get_database_types() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use DatabaseDriverList::getList() instead. See https://www.drupal.org/node/3258175');
$installableDriverNames = [];
foreach (Database::getDriverList()->getInstallableList() as $driver => $driverExtension) {
$installableDriverNames[$driverExtension->getDriverName()] = $driverExtension->getInstallTasks()->name();
}
$this->assertEquals($installableDriverNames, drupal_detect_database_types());
}
}