Commit 29a4ef52 authored by Marco Pivetta's avatar Marco Pivetta

Adding failing test for DBAL-522

Demonstrates that NULL parameters are handled incorrectly by the sql parser utils as of 2.3.4
parent d69ecc73
......@@ -286,6 +286,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