Ejemplo n.º 1
0
 private function loadExtension(array $config = [])
 {
     $defaults = ['sb_redis' => ['clients' => ['test' => ['alias' => 'test.client']]]];
     $extension = new RedisExtension();
     $container = new ContainerBuilder();
     $extension->load(array_merge_recursive($defaults, $config), $container);
     return $container;
 }
 public function testClientAlias()
 {
     $config = ['sb_redis' => ['clients' => ['test' => ['alias' => 'test']]]];
     $extension = new RedisExtension();
     $container = new ContainerBuilder();
     $this->assertFalse($container->has('test'));
     $extension->load($config, $container);
     $this->assertTrue($container->has('test'));
 }