public function setUp()
 {
     parent::setUp();
     $manager = new Tx_Doctrine2_Manager();
     $manager->setEntityManager($this->entityManager);
     $factory = new Tx_Doctrine2_QueryFactory();
     $factory->injectManager($manager);
     $this->repository = new Tx_TestApp_Domain_Repository_PersonRepository(null);
     $this->repository->setEntityManager($this->entityManager);
     $this->repository->injectQueryFactory($factory);
 }
 public function createQuery()
 {
     $query = $this->queryFactory->create($this->objectType);
     if ($this->defaultOrderings) {
         $query->setOrderings($this->defaultOrderings);
     }
     if ($this->defaultQuerySettings) {
         $query->setQuerySettings($this->defaultQuerySettings);
     }
     return $query;
 }