From 2906d6570cd816f2edfd949e280c162f2f1e033f Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 24 Mar 2005 12:31:37 +0000 Subject: [PATCH] - Add new test --- ext/pdo/tests/pdo_024.inc | 21 +++++++++++++++++++++ ext/pdo_mysql/tests/pdo_024.phpt | 21 +++++++++++++++++++++ ext/pdo_pgsql/tests/pdo_024.phpt | 21 +++++++++++++++++++++ ext/pdo_sqlite/tests/pdo_024.phpt | 21 +++++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100755 ext/pdo/tests/pdo_024.inc create mode 100755 ext/pdo_mysql/tests/pdo_024.phpt create mode 100755 ext/pdo_pgsql/tests/pdo_024.phpt create mode 100755 ext/pdo_sqlite/tests/pdo_024.phpt diff --git a/ext/pdo/tests/pdo_024.inc b/ext/pdo/tests/pdo_024.inc new file mode 100755 index 0000000000..60bb30a77c --- /dev/null +++ b/ext/pdo/tests/pdo_024.inc @@ -0,0 +1,21 @@ +query($SQL['create']); +$stmt = $DB->prepare($SQL['insert']); +$name = NULL; +$before_bind = $name; +$stmt->bindParam(':name', $name); +if ($name !== $before_bind) { + echo "bind: fail\n"; +} else { + echo "bind: success\n"; +} +var_dump($stmt->execute()); +var_dump($DB->query($SQL['select'])->fetchSingle()); +?> diff --git a/ext/pdo_mysql/tests/pdo_024.phpt b/ext/pdo_mysql/tests/pdo_024.phpt new file mode 100755 index 0000000000..bf14896fcc --- /dev/null +++ b/ext/pdo_mysql/tests/pdo_024.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_MySQL: Bind does not convert NULL +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +bind: success +bool(true) +NULL +===DONE=== diff --git a/ext/pdo_pgsql/tests/pdo_024.phpt b/ext/pdo_pgsql/tests/pdo_024.phpt new file mode 100755 index 0000000000..634e0bca4f --- /dev/null +++ b/ext/pdo_pgsql/tests/pdo_024.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_PGSQL: Bind does not convert NULL +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +bind: success +bool(true) +NULL +===DONE=== diff --git a/ext/pdo_sqlite/tests/pdo_024.phpt b/ext/pdo_sqlite/tests/pdo_024.phpt new file mode 100755 index 0000000000..15530419d7 --- /dev/null +++ b/ext/pdo_sqlite/tests/pdo_024.phpt @@ -0,0 +1,21 @@ +--TEST-- +PDO_SQLite: Bind does not convert NULL +--SKIPIF-- + +--FILE-- + +===DONE=== + +--EXPECTF-- +bind: success +bool(true) +NULL +===DONE=== -- 2.50.1