protected function MemoryStorageTest::setUp in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/service_container/Tests/KeyValue/MemoryStorageTest.php \Drupal\service_container\Tests\KeyValue\MemoryStorageTest::setUp()
Overrides StorageTestBase::setUp
File
- lib/
Drupal/ service_container/ Tests/ KeyValue/ MemoryStorageTest.php, line 30 - Contains Drupal\system\Tests\KeyValueStore\MemoryStorageTest.
Class
- MemoryStorageTest
- Tests the key-value memory storage.
Namespace
Drupal\service_container\Tests\KeyValueCode
protected function setUp() {
parent::setUp('service_container_test');
\ServiceContainer::reset();
$services = array();
$services['keyvalue.memory'] = array(
'class' => 'Drupal\\Core\\KeyValueStore\\KeyValueMemoryFactory',
);
$parameters = array();
$parameters['factory.keyvalue'][KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.memory';
$definition['services'] = $services;
$definition['parameters'] = $parameters;
variable_set('service_container_test_definition', $definition);
\ServiceContainer::init();
}