Exemple #1
0
 public function testCache()
 {
     $storage = new MongoStorage('ConfigServer_test', 'config', 'localhost');
     $config = new ConfigServer($storage);
     $config->setCache(new Cache(new NullableMemcache()));
     $config->set('key', 'value');
     $config->set('key:2', 'value:2');
     $this->assertEquals('value', $config->get('key'));
     $storage->collection()->drop();
     $this->assertEquals('value', $config->get('key'));
     $this->assertEquals('value:2', $config->get('key:2'));
 }
 protected function tearDown()
 {
     $this->mongoStorage->collection()->drop();
 }