Skip to content

Commit

Permalink
added failling test regarding implode in query
Browse files Browse the repository at this point in the history
  • Loading branch information
clxmstaab authored and staabm committed Feb 6, 2022
1 parent 8bf7b13 commit d14fbd9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/default/data/pdo.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public function concatedQuerySelected(PDO $pdo, int $int, string $string, float
$stmt = $pdo->query('SELECT email, adaid, gesperrt, freigabe1u1 FROM ada WHERE adaid='.self::INT, PDO::FETCH_ASSOC);
assertType('PDOStatement<array{email: string, adaid: int<0, 4294967295>, gesperrt: int<-128, 127>, freigabe1u1: int<-128, 127>}>', $stmt);

$stmt = $pdo->query('SELECT email, adaid, gesperrt, freigabe1u1 FROM ada WHERE adaid IN('. implode(',', [self::INT, 3]).')', PDO::FETCH_ASSOC);
assertType('PDOStatement<array{email: string, adaid: int<0, 4294967295>, gesperrt: int<-128, 127>, freigabe1u1: int<-128, 127>}>', $stmt);

$stmt = $pdo->query("SELECT email, adaid, gesperrt, freigabe1u1 FROM ada WHERE email='".self::FOO."'", PDO::FETCH_ASSOC);
assertType('PDOStatement<array{email: string, adaid: int<0, 4294967295>, gesperrt: int<-128, 127>, freigabe1u1: int<-128, 127>}>', $stmt);

Expand Down

0 comments on commit d14fbd9

Please sign in to comment.