/**
  * Merges the configuration given by an extension.
  *
  * @param $key    string The extension tag to load (namespace.tag)
  * @param $values array  An array of values to customize the extension
  *
  * @return BuilderConfiguration The current instance
  */
 public function mergeExtension($key, array $values = array())
 {
     list($namespace, $tag) = explode('.', $key);
     $config = Loader::getExtension($namespace)->load($tag, $values);
     $this->merge($config);
     return $this;
 }
 public function testUseMulitpleDocumentManagers()
 {
     $container = $this->createContainer();
     $bundle = new Bundle();
     $bundle->buildContainer($container);
     $mongoExtension = Loader::getExtension('mongodb');
     $config = $this->defaultConfiguration;
     $config['document_managers']['test'] = array('connection' => 'test');
     $config['connections']['test'] = array('server' => 'localhost/testing');
     $configuration = $mongoExtension->odmLoad($config);
     $container->merge($configuration);
     $dmDefault = $container->getDoctrine_ODM_DefaultDocumentManagerService();
     $dmTest = $container->getDoctrine_ODM_TestDocumentManagerService();
     $this->assertTrue($dmDefault !== $dmTest);
 }