protected function MongoDbTestBase::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.
4 calls to MongoDbTestBase::getSettingsArray()
- KeyValueTestBase::getSettingsArray in modules/
mongodb_storage/ tests/ src/ Kernel/ KeyValueTestBase.php - Prepare the Settings from a base set of MongoDB settings.
- LoggerTest::getSettingsArray in modules/
mongodb_watchdog/ tests/ src/ Kernel/ LoggerTest.php - Prepare the Settings from a base set of MongoDB settings.
- MongoDbTestBase::setUp in modules/
mongodb/ tests/ src/ Kernel/ MongoDbTestBase.php - ToolsTest::testToolsSettings in modules/
mongodb/ tests/ src/ Kernel/ ToolsTest.php - @covers ::settings
2 methods override MongoDbTestBase::getSettingsArray()
- KeyValueTestBase::getSettingsArray in modules/
mongodb_storage/ tests/ src/ Kernel/ KeyValueTestBase.php - Prepare the Settings from a base set of MongoDB settings.
- LoggerTest::getSettingsArray in modules/
mongodb_watchdog/ tests/ src/ Kernel/ LoggerTest.php - Prepare the Settings from a base set of MongoDB settings.
File
- modules/
mongodb/ tests/ src/ Kernel/ MongoDbTestBase.php, line 74
Class
- MongoDbTestBase
- Class MongoDbTestBase provides basic setUp()/tearDown() for MongoDB.
Namespace
Drupal\Tests\mongodb\KernelCode
protected function getSettingsArray() : array {
return [
'clients' => [
static::CLIENT_BAD_ALIAS => [
'uri' => 'mongodb://localhost:80',
'uriOptions' => [],
'driverOptions' => [],
],
static::CLIENT_TEST_ALIAS => [
'uri' => $this->uri,
'uriOptions' => [],
'driverOptions' => [],
],
],
'databases' => [
static::DB_DEFAULT_ALIAS => [
static::CLIENT_TEST_ALIAS,
$this
->getDatabasePrefix(),
],
static::DB_INVALID_ALIAS => [
static::CLIENT_TEST_ALIAS,
'',
],
static::DB_BAD_CLIENT_ALIAS => [
static::CLIENT_BAD_ALIAS,
$this
->getDatabasePrefix(),
],
],
];
}