function testFlushStats() { $this->driver->shouldReceive('prepare'); $sqlStmt = 'foo'; $this->dbManager->prepare($sqlStmt, 'SELECT elephant FROM africa'); $this->logger->shouldReceive('addDebug')->with("/executing '{$sqlStmt}' took /"); $this->dbManager->flushStats(); }