public function testNoExceptionWhenEmptyQuery()
 {
     $dbC = new DatabaseTestingConnector();
     $databaseIO = new Database_IO($dbC->getConfig());
     $dbC->dropAllTables();
     $flag = false;
     try {
         $databaseIO->query('', MULTI_QUERY);
         $databaseIO->query('', RETURN_VALUE);
         $databaseIO->query('', RETURN_OBJECT);
     } catch (Exception $e) {
         $flag = true;
     }
     $this->assertEqual($flag, false);
 }
 public function resumeUpdate()
 {
     // creates $updateCache
     include $this->getUpdateCacheFilename();
     // sort it backwards so we can POP (which is a nicer sound than SHIFT)
     krsort($updateCache);
     $versioning = new DIM_Versioning();
     $database = new Database_IO($this->getDatabaseSettings());
     while ($update = array_pop($updateCache)) {
         $database->query(base64_decode($update["queries"]), MULTI_QUERY, true);
         $versioning->addNewVersion($update["version"], $update["commitMessage"]);
         $this->logger->addLogItem("Local database now updated to version " . $update["version"], "update");
         // save the update cache now in case we die on the next iteration
         $this->saveUpdateCache($updateCache);
     }
     // if we get to here then all is well!
     unlink($this->getUpdateCacheFilename());
 }