Пример #1
0
 /**
  * Tear down test environment.
  */
 public function tearDown()
 {
     if ($triggers = $this->connection->execute('SHOW TRIGGERS')) {
         foreach ($triggers as $trigger) {
             $this->connection->execute('DROP TRIGGER ' . $this->connection->escapeFieldName($trigger['Trigger']));
         }
     }
     $this->connection->execute('SET foreign_key_checks = 0;');
     foreach ($this->connection->getTableNames() as $table_name) {
         $this->connection->dropTable($table_name);
     }
     $this->connection->execute('SET foreign_key_checks = 1;');
     $this->connection = null;
     $this->link->close();
     parent::tearDown();
 }