function InstallerNonDefaultDatabaseDriverTest::getInstalledDatabaseSettings

Returns the databases setup from the SUT's settings.php.

Return value

array<string,mixed> The value of the $databases variable.

1 call to InstallerNonDefaultDatabaseDriverTest::getInstalledDatabaseSettings()
InstallerNonDefaultDatabaseDriverTest::testInstalled in core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
Confirms that the installation succeeded.

File

core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php, line 103

Class

InstallerNonDefaultDatabaseDriverTest
Tests the interactive installer.

Namespace

Drupal\FunctionalTests\Installer

Code

protected function getInstalledDatabaseSettings() : array {
    // The $app_root and $site_path variables are required by the settings.php
    // file to be parsed correctly. The $databases variable is set in the
    // included file, we need to inform PHPStan about that since PHPStan itself
    // is unable to determine it.
    $app_root = $this->container
        ->getParameter('app.root');
    $site_path = $this->siteDirectory;
    include $app_root . '/' . $site_path . '/settings.php';
    assert(isset($databases));
    return $databases;
}

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