setEnvironment() public method

Sets the environment
public setEnvironment ( string $environment )
$environment string
コード例 #1
0
 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);
 }