コード例 #1
0
 /**
  * Reset DB sequences.
  */
 public function resetSequences()
 {
     parent::resetSequences();
     switch ($this->db) {
         case 'pgsql':
             // Update PostgreSQL sequences
             $handler = $this->getDatabaseHandler();
             $queries = array_filter(preg_split('(;\\s*$)m', file_get_contents(__DIR__ . '/../../_fixtures/schema/setval.pgsql.sql')));
             foreach ($queries as $query) {
                 $handler->exec($query);
             }
             break;
     }
 }
コード例 #2
0
 /**
  * Removes the temp dir.
  */
 public static function tearDownAfterClass()
 {
     self::removeRecursive(self::$tmpDir);
     parent::tearDownAfterClass();
 }