getConnection()->getWrappedConnection(); return self::$conn = $this->createDefaultDBConnection($pdo, static::$em->getConnection()->getDatabase()); } public function getDataSet(): DataSet { return $this->createArrayDataSet([]); } protected function getEntityManager(): EntityManagerInterface { return static::$em; } public function tearDown() { // Empty all entity tables defined by this test after each test foreach (static::ENTITIES_TO_EMPTY as $entityClass) { $qb = $this->getEntityManager()->createQueryBuilder(); $qb->delete($entityClass, 'x'); $qb->getQuery()->execute(); } // Clear entity manager $this->getEntityManager()->clear(); } }