Is using [ really a good idea - If any queries want to use a character range, they can't and also most regex characters need quoting, but not square brackets.

Maybe it would be a good idea to add a parameter for assuming the input string is a litteral string so it's not necessary to escape inputs all the time ala:

    public function assertQuotedQuery($pattern, $query, $options = []) {

    $this->assertQuotedQuery('INSERT INTO `foo` ((bar))', $sql);

    $this->assertQuotedQuery('INSERT INTO `[a-z]` (some|regex|group)', $sql, ['isRegex' => true]);

Or similar