public function pretend(Closure $callback)
{
$loggingQueries = $this->loggingQueries;
$this->enableQueryLog();
$this->pretending = true;
$this->queryLog = [];
// Basically to make the database connection "pretend", we will just return
// the default values for all the query methods, then we will return an
// array of queries that were "executed" within the Closure callback.
$callback($this);
$this->pretending = false;
$this->loggingQueries = $loggingQueries;
return $this->queryLog;
}