public function tearDown()
 {
     if (count($this->tables)) {
         foreach ($this->tables as $table) {
             // drop table
             $conn = $this->getConnection();
             $pdo = $conn->getConnection();
             $pdo->exec("DROP TABLE IF EXISTS `{$table}`;");
         }
     }
     $allTables = $this->getDataSet($this->fixtures)->getTableNames();
     foreach ($allTables as $table) {
         // drop table
         $conn = $this->getConnection();
         $pdo = $conn->getConnection();
         $pdo->exec("DROP TABLE IF EXISTS `{$table}`;");
     }
     $db = Loader::db();
     $db->getEntityManager()->clear();
     Database::purge();
     if ($this->conn) {
         $this->conn = null;
     }
     parent::tearDown();
 }