Skip to content

Commit 793e064

Browse files
authored
added mysqli::execute_query() support (php 8.2+ only) (#430)
1 parent c280be4 commit 793e064

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/rules/SyntaxErrorInQueryMethodRuleTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,18 @@ public function testSyntaxErrorInQueryRule(): void
217217

218218
$this->analyse([__DIR__.'/data/syntax-error-in-query-method.php'], $expected);
219219
}
220+
221+
public function testMysqliExecuteQuery(): void
222+
{
223+
if (\PHP_VERSION_ID < 80200) {
224+
self::markTestSkipped('Test requires PHP 8.2.');
225+
}
226+
227+
$this->analyse([__DIR__.'/data/mysqli_execute_query.php'], [
228+
[
229+
"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).",
230+
9,
231+
],
232+
]);
233+
}
220234
}

0 commit comments

Comments
 (0)