public function testRegistersValidatorNamespace()
 {
     $container = $this->getContainer();
     $container->setParameter('validator.annotations.namespaces', array('Namespace1\\', 'Namespace2\\'));
     $loader = new DoctrineMongoDBExtension();
     $loader->load(array(array()), $container);
     $this->assertEquals(array('Namespace1\\', 'Namespace2\\', 'mongodb' => 'Symfony\\Bundle\\DoctrineMongoDBBundle\\Validator\\Constraints\\'), $container->getParameter('validator.annotations.namespaces'));
 }
 public function testAnnotationsBundleMappingDetection()
 {
     $container = $this->getContainer('AnnotationsBundle');
     $loader = new DoctrineMongoDBExtension();
     $loader->load(array(array('document_managers' => array('default' => array('mappings' => array('AnnotationsBundle' => array()))))), $container);
     $calls = $container->getDefinition('doctrine.odm.mongodb.default_metadata_driver')->getMethodCalls();
     $this->assertEquals('doctrine.odm.mongodb.default_annotation_metadata_driver', (string) $calls[0][1][0]);
     $this->assertEquals('DoctrineMongoDBBundle\\Tests\\DependencyInjection\\Fixtures\\Bundles\\AnnotationsBundle\\Document', $calls[0][1][1]);
 }