/**
  * Restore previous GLOBAL scope, by unsetting the ones created since {@link setUp()}.
  */
 function tearDown()
 {
     $used_globals = array_keys($GLOBALS);
     foreach (array_diff($used_globals, $this->used_globals) as $k) {
         unset($GLOBALS[$k]);
     }
     parent::tearDown();
 }
 /**
  * Setup global $DB as original DB object again.
  */
 function tearDown()
 {
     $this->test_DB->commit();
     if ($this->test_DB->error) {
         $this->fail('There has been a DB error.');
     }
     $this->dropTestDbTables();
     $GLOBALS['DB'] =& $this->old_DB;
     parent::tearDown();
 }
 /**
  * Unlink created temp files.
  *
  * Call it in {@link tearDown()} if you use {@link createTempFile()}.
  */
 function unlinkCreatedFiles()
 {
     while ($tempPath = array_pop($this->tempFiles)) {
         @unlink($tempPath);
     }
     parent::tearDown();
 }
 /**
  * Restore global $DB
  */
 function tearDown()
 {
     $GLOBALS['DB'] = $this->old_EvoPluginUnitTestCase_DB;
     parent::tearDown();
 }
 /**
  * Setup global $DB as original DB object again.
  */
 function tearDown()
 {
     $GLOBALS['DB'] = $this->old_DB_EvoMockDbUnitTestCase;
     parent::tearDown();
 }