You are here

protected function InstallerObjectTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::setUp()
  2. 9 core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php, line 31

Class

InstallerObjectTest
Tests the db_installer_object() function that is used during installation.

Namespace

Drupal\Tests\Core\Database

Code

protected function setUp() : void {
  parent::setUp();
  require_once __DIR__ . '/../../../../../includes/install.inc';
  $additional_class_loader = new ClassLoader();
  $additional_class_loader
    ->addPsr4("Drupal\\Driver\\Database\\fake\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/custom/fake");
  $additional_class_loader
    ->addPsr4("Drupal\\Core\\Database\\Driver\\corefake\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/core/corefake");
  $additional_class_loader
    ->addPsr4("Drupal\\Driver\\Database\\corefake\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/custom/corefake");
  $additional_class_loader
    ->addPsr4("Drupal\\driver_test\\Driver\\Database\\DrivertestMysql\\", __DIR__ . "/../../../../../../modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql");
  $additional_class_loader
    ->register(TRUE);
}