ManagedStorageTest.php in Drupal 8
File
core/tests/Drupal/KernelTests/Core/Config/Storage/ManagedStorageTest.php
View source
<?php
namespace Drupal\KernelTests\Core\Config\Storage;
use Drupal\Core\Config\StorageManagerInterface;
use Drupal\Core\Config\ManagedStorage;
use Drupal\Core\Config\MemoryStorage;
class ManagedStorageTest extends ConfigStorageTestBase implements StorageManagerInterface {
public function getStorage() {
return new MemoryStorage();
}
protected function setUp() {
parent::setUp();
$this->storage = new ManagedStorage($this);
$this->storage
->write('system.performance', []);
}
protected function read($name) {
return $this->storage
->read($name);
}
protected function insert($name, $data) {
$this->storage
->write($name, $data);
}
protected function update($name, $data) {
$this->storage
->write($name, $data);
}
protected function delete($name) {
$this->storage
->delete($name);
}
public function testInvalidStorage() {
$this
->markTestSkipped('ManagedStorage cannot be invalid.');
}
}