protected function KeyValueTest::setUp in MongoDB 8
File
- src/
Tests/ KeyValueTest.php, line 41 - Contains Drupal\mongodb\Tests\KeyValueTest.
Class
- KeyValueTest
- Tests the key-value MongoDB storage.
Namespace
Drupal\mongodb\TestsCode
protected function setUp() {
parent::setUp();
$this->container
->register('mongo', 'Drupal\\mongodb\\MongoCollectionFactory')
->addArgument(new Reference('settings'));
$this->container
->register('keyvalue.mongodb', 'Drupal\\mongodb\\KeyValueFactory')
->addArgument(new Reference('mongo'))
->addArgument(new Reference('settings'));
if (isset($conf['keyvalue_default'])) {
$this->originalKeyValue = $conf['keyvalue_default'];
}
$this
->settingsSet('keyvalue_default', 'keyvalue.mongodb');
if (isset($conf['keyvalue_expirable_default'])) {
$this->originalExpirableKeyValue = $conf['keyvalue_expirable_default'];
}
$this
->settingsSet('keyvalue_expirable_default', 'keyvalue.mongodb');
}