/** * @param $entity * * @return \Doctrine\ORM\EntityRepository */ private function getRepo($entity) { $entityManager = SurveyEntityManager::getEntityManager(); return $entityManager->getRepository($entity); }
/** * Detaches all entties from the current entity manager. */ public static function testClear() { $em = SurveyEntityManager::getEntityManager(true, true); $em->clear(); }