/** * Performs a test. * Given a query, a set of bindings and an expected outcome, * this method tests the result of the debugger. * * @param string $query * @param mixed $bindings * @param string $expected * * @return void */ private function testDebug($query, $bindings = NULL, $expected) { $debugger = new Debugger(); $debugger->setMode(1); $debugger->setParamStringLength(20); if (!is_null($bindings)) { $debugger->log($query, $bindings); } else { $debugger->log($query); } $logs = $debugger->getLogs(); $log = reset($logs); asrt($log, $expected); $debugger->clear(); }