Commit 084e6270 authored by catch's avatar catch

Issue #3108025 by Beakerboy, alexpott, daffie, bohart: Function...

Issue #3108025 by Beakerboy, alexpott, daffie, bohart:  Function testNumericExpressionSubstitution uses non-standard SQL
parent 3d9ac252
......@@ -142,13 +142,12 @@ public function testConditionOperatorArgumentsSQLInjection() {
* @see http://bugs.php.net/bug.php?id=45259
*/
public function testNumericExpressionSubstitution() {
$count = $this->connection->query('SELECT COUNT(*) >= 3 FROM {test}')->fetchField();
$this->assertEqual((bool) $count, TRUE);
$count_expected = $this->connection->query('SELECT COUNT(*) + 3 FROM {test}')->fetchField();
$count = $this->connection->query('SELECT COUNT(*) >= :count FROM {test}', [
$count = $this->connection->query('SELECT COUNT(*) + :count FROM {test}', [
':count' => 3,
])->fetchField();
$this->assertEqual((bool) $count, TRUE);
$this->assertEqual($count, $count_expected);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment