Example #1
0
 /**
  * {@inheritdoc}
  */
 public function tearDown()
 {
     $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->disconnect();
     parent::tearDown();
 }
Example #2
0
 /**
  * Tear down test environment.
  */
 public function tearDown()
 {
     foreach ([MySqlQueue::BATCHES_TABLE_NAME, MySqlQueue::JOBS_TABLE_NAME, MySqlQueue::FAILED_JOBS_TABLE_NAME, 'email_log'] as $table_name) {
         if ($this->connection->tableExists($table_name)) {
             $this->connection->dropTable($table_name);
         }
     }
     if ($this->link) {
         $this->link->close();
     }
     if (is_file($this->log_file_path)) {
         unlink($this->log_file_path);
     }
     parent::tearDown();
 }