You are here

protected function DatabaseStorageExpirableTest::setUp in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/service_container/Tests/KeyValue/DatabaseStorageExpirableTest.php \Drupal\service_container\Tests\KeyValue\DatabaseStorageExpirableTest::setUp()

Overrides StorageTestBase::setUp

File

lib/Drupal/service_container/Tests/KeyValue/DatabaseStorageExpirableTest.php, line 32
Contains Drupal\system\Tests\KeyValueStore\DatabaseStorageExpirableTest.

Class

DatabaseStorageExpirableTest
Tests the key-value database storage.

Namespace

Drupal\service_container\Tests\KeyValue

Code

protected function setUp() {
  parent::setUp('service_container_test');
  $this->factory = 'keyvalue.expirable';
  \ServiceContainer::reset();
  $parameters = array();
  $parameters['factory.keyvalue.expirable'][KeyValueExpirableFactory::DEFAULT_SETTING] = 'keyvalue.expirable.database';
  $definition['parameters'] = $parameters;
  variable_set('service_container_test_definition', $definition);
  \ServiceContainer::init();
}