RedUNIT\Blackhole\Debug::testDebug PHP Method

testDebug() private method

Given a query, a set of bindings and an expected outcome, this method tests the result of the debugger.
private testDebug ( string $query, mixed $bindings = NULL, string $expected ) : void
$query string
$bindings mixed
$expected string
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);
        $log = str_replace("", '', $log);
        $log = str_replace("", '', $log);
        asrt($log, $expected);
        $debugger->clear();
    }