Commit 6141e92e authored by Marco Pivetta's avatar Marco Pivetta Committed by Benjamin Eberlei

Adding failing test for DBAL-522

Demonstrates that NULL parameters are handled incorrectly by the sql parser utils as of 2.3.4
parent 081e461e
......@@ -287,6 +287,23 @@ SQLDATA
array(1, 2, 'bar'),
array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR)
),
// DBAL-522 - null valued parameters are not considered
array(
'INSERT INTO Foo (foo, bar) values (:foo, :bar)',
array('foo' => 1, 'bar' => null),
array(':foo' => \PDO::PARAM_INT, ':bar' => \PDO::PARAM_NULL),
'INSERT INTO Foo (foo, bar) values (?, ?)',
array(1, null),
array(\PDO::PARAM_INT, \PDO::PARAM_NULL)
),
array(
'INSERT INTO Foo (foo, bar) values (?, ?)',
array(1, null),
array(\PDO::PARAM_INT, \PDO::PARAM_NULL),
'INSERT INTO Foo (foo, bar) values (?, ?)',
array(1, null),
array(\PDO::PARAM_INT, \PDO::PARAM_NULL)
),
);
}
......
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