diff --git a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php index b004b63b35..3a86b6b1fa 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/QueryTest.php @@ -142,13 +142,13 @@ 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(); + $count_expected = $this->connection->query('SELECT COUNT(*) + 3 FROM {test}')->fetchField(); $this->assertEqual((bool) $count, TRUE); - $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); } }