Skip to content

Commit

Permalink
added mysqli::execute_query() support (php 8.2+ only) (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Oct 4, 2022
1 parent c280be4 commit 793e064
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/rules/SyntaxErrorInQueryMethodRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,18 @@ public function testSyntaxErrorInQueryRule(): void

$this->analyse([__DIR__.'/data/syntax-error-in-query-method.php'], $expected);
}

public function testMysqliExecuteQuery(): void
{
if (\PHP_VERSION_ID < 80200) {
self::markTestSkipped('Test requires PHP 8.2.');
}

$this->analyse([__DIR__.'/data/mysqli_execute_query.php'], [
[
"Query error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL/MariaDB server version for the right syntax to use near 'freigabe1u1 FROM ada LIMIT 0' at line 1 (1064).",
9,
],
]);
}
}

0 comments on commit 793e064

Please sign in to comment.