public function setUp()
 {
     $annotationDriver = $this->createAnnotationDriver();
     $this->em = $this->_getTestEntityManager();
     $this->em->getConfiguration()->setMetadataDriverImpl($annotationDriver);
     $this->factory = $this->em->getMetadataFactory();
     $this->listener = new ResolveTargetEntityListener();
 }
示例#2
0
 /**
  * {@inheritDoc}
  */
 public function __construct($query, $parserResult, array $queryComponents)
 {
     $this->query = $query;
     $this->parserResult = $parserResult;
     $this->queryComponents = $queryComponents;
     $this->rsm = $parserResult->getResultSetMapping();
     $this->em = $query->getEntityManager();
     $this->conn = $this->em->getConnection();
     $this->platform = $this->conn->getDatabasePlatform();
     $this->quoteStrategy = $this->em->getConfiguration()->getQuoteStrategy();
 }
 public function testRoutingModelSet()
 {
     $this->em->getConfiguration()->getMetadataDriverImpl()->addPaths(array(__DIR__ . "/../../Models/Routing"));
     $this->validator->validateMapping();
 }
 /**
  * {@inheritDoc}
  */
 protected function getFqcnFromAlias($namespaceAlias, $simpleClassName)
 {
     return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
 }