/**
  * {@inheritdoc}
  */
 public function containerBuild(ContainerBuilder $container)
 {
     parent::containerBuild($container);
     $container->register('keyvalue.memory', 'Drupal\\Core\\KeyValueStore\\KeyValueMemoryFactory');
     $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.memory';
     $container->setParameter('factory.keyvalue', $parameter);
 }
 protected function tearDown()
 {
     // The DatabaseExpirableStorage class has a destructor which deletes rows
     // from the key_value_expire table. We need to make sure the destructor
     // runs before the table is deleted.
     $this->container->set('keyvalue.expirable', NULL);
     db_drop_table('key_value_expire');
     parent::tearDown();
 }
 /**
  * {@inheritdoc}
  */
 public function containerBuild(ContainerBuilder $container)
 {
     parent::containerBuild($container);
     $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.expirable.database';
     $container->setParameter('factory.keyvalue.expirable', $parameter);
 }
Ejemplo n.º 4
0
 protected function tearDown()
 {
     db_drop_table('key_value');
     parent::tearDown();
 }