public function setUp() { $config = new Configuration(); $config->setProxyDir(__DIR__ . '/../../../../../Proxies'); $config->setProxyNamespace('Proxies'); $config->setEnvironment('test'); $config->setDefaultDB($this->defaultDB); $reader = new AnnotationReader(); $reader->setDefaultAnnotationNamespace('Doctrine\\ODM\\MongoDB\\Mapping\\'); $config->setMetadataDriverImpl(new AnnotationDriver($reader, __DIR__ . '/Documents')); $this->dm = DocumentManager::create(new Mongo(), $config); }