Example #1
0
 public function testSetGetEntityNamespace()
 {
     $this->configuration->addEntityNamespace('TestNamespace', __NAMESPACE__);
     $this->assertSame(__NAMESPACE__, $this->configuration->getEntityNamespace('TestNamespace'));
     $namespaces = array('OtherNamespace' => __NAMESPACE__);
     $this->configuration->setEntityNamespaces($namespaces);
     $this->assertSame($namespaces, $this->configuration->getEntityNamespaces());
     $this->setExpectedException('Doctrine\\ORM\\ORMException');
     $this->configuration->getEntityNamespace('NonExistingNamespace');
 }
 /**
  * @param OrmConfiguration $configuration
  */
 public function addEntityNamespaces(OrmConfiguration $configuration)
 {
     $this->knownNamespaceAlias = array_merge($this->knownNamespaceAlias, $configuration->getEntityNamespaces());
     if ($configuration->getMetadataDriverImpl()) {
         $this->entityClassnames = array_merge($this->entityClassnames, $configuration->getMetadataDriverImpl()->getAllClassNames());
     }
 }
 /**
  * @param OrmConfiguration $configuration
  */
 public function addEntityNamespaces(OrmConfiguration $configuration)
 {
     $this->knownNamespaceAlias = array_merge($this->knownNamespaceAlias, $configuration->getEntityNamespaces());
 }