You are here

protected function ControllerTest::getSettingsArray in MongoDB 8.2

Prepare the Settings from a base set of MongoDB settings.

Return value

array A settings array only containing MongoDB-related settings.

2 calls to ControllerTest::getSettingsArray()
ControllerTest::setUp in modules/mongodb_watchdog/tests/src/Functional/ControllerTest.php
Configure settings and create users with specific permissions.
ControllerTest::writeSettings in modules/mongodb_watchdog/tests/src/Functional/ControllerTest.php
Rewrites the settings.php file of the test site.

File

modules/mongodb_watchdog/tests/src/Functional/ControllerTest.php, line 242

Class

ControllerTest
Test the MongoDB report controllers.

Namespace

Drupal\Tests\mongodb_watchdog\Functional

Code

protected function getSettingsArray() : array {
  return [
    'clients' => [
      static::CLIENT_TEST_ALIAS => [
        'uri' => $this->uri,
        'uriOptions' => [],
        'driverOptions' => [],
      ],
    ],
    'databases' => [
      static::DB_DEFAULT_ALIAS => [
        static::CLIENT_TEST_ALIAS,
        $this
          ->getDatabasePrefix(),
      ],
      Logger::DB_LOGGER => [
        static::CLIENT_TEST_ALIAS,
        $this
          ->getDatabasePrefix(),
      ],
    ],
  ];
}