protected function ConfigStorageTest::update in MongoDB 8
1 call to ConfigStorageTest::update()
- ConfigStorageTest::testCRUD in src/
Tests/ ConfigStorageTest.php - Overrides Drupal\config\Tests\Storage\ConfigStorageTestBase::testCRUD().
File
- src/
Tests/ ConfigStorageTest.php, line 156 - Definition of Drupal\mongodb\Tests\ConfigStorageTest.
Class
- ConfigStorageTest
- Tests ConfigStorage controller operations.
Namespace
Drupal\mongodb\TestsCode
protected function update($name, $data) {
if (is_string($data)) {
$data = Yaml::parse($data);
if (!is_array($data)) {
return;
}
}
$data['_id'] = $name;
\Drupal::service('mongo')
->get('config.active')
->insert($data);
}