function InstallerObjectTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php \Drupal\Tests\Core\Database\InstallerObjectTest::setUp()
  2. 10 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 30

Class

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

Namespace

Drupal\Tests\Core\Database

Code

protected function setUp() {
    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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.