저자: Bulat Shakirzyanov (bulat@theopenskyproject.com)
저자: Kris Wallsmith (kris.wallsmith@symfony-project.com)
저자: Jonathan H. Wage (jonwage@gmail.com)
상속: extends Symfony\Bundle\DoctrineAbstractBundle\DependencyInjection\AbstractDoctrineExtension
 public function testAnnotationsBundleMappingDetection()
 {
     $container = $this->getContainer('AnnotationsBundle');
     $loader = new DoctrineMongoDBExtension();
     $loader->mongodbLoad(array(), $container);
     $this->assertEquals(array(), $container->getParameter('doctrine.odm.mongodb.mapping_dirs'));
     $this->assertEquals('%doctrine.odm.mongodb.mapping_dirs%', $container->getParameter('doctrine.odm.mongodb.xml_mapping_dirs'));
     $this->assertEquals('%doctrine.odm.mongodb.mapping_dirs%', $container->getParameter('doctrine.odm.mongodb.yml_mapping_dirs'));
     $this->assertEquals(array(__DIR__ . '/Fixtures/Bundles/AnnotationsBundle/Document'), $container->getParameter('doctrine.odm.mongodb.document_dirs'));
     $calls = $container->getDefinition('doctrine.odm.mongodb.metadata')->getMethodCalls();
     $this->assertEquals('doctrine.odm.mongodb.metadata.annotation', (string) $calls[0][1][0]);
     $this->assertEquals('DoctrineMongoDBBundle\\Tests\\DependencyInjection\\Fixtures\\Bundles\\AnnotationsBundle\\Document', $calls[0][1][1]);
 }
 public function testRegistersValidatorNamespace()
 {
     $container = $this->getContainer();
     $container->setParameter('validator.annotations.namespaces', array('Namespace1\\', 'Namespace2\\'));
     $loader = new DoctrineMongoDBExtension();
     $loader->mongodbLoad(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->mongodbLoad(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]);
 }