From 569c22fcb5e97f38f8a9cff361a8ea4c8d5bdd1e Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 14 May 2013 14:41:15 +0200 Subject: [PATCH] test Statement::bind() --- package.xml | 1 + tests/stm_bound001.phpt | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 tests/stm_bound001.phpt diff --git a/package.xml b/package.xml index 4956eda..74bbc58 100644 --- a/package.xml +++ b/package.xml @@ -114,6 +114,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> + diff --git a/tests/stm_bound001.phpt b/tests/stm_bound001.phpt new file mode 100644 index 0000000..acf93ac --- /dev/null +++ b/tests/stm_bound001.phpt @@ -0,0 +1,50 @@ +--TEST-- +statement w/ bound vars +--SKIPIF-- + +--FILE-- +bind(0, $_1); +$s->bind(1, $_2); +$s->bind(2, $_3); +$r = $s->exec(); +var_dump($r->fetchAll()); +$_1 = "\$1"; +$_2 = "\$2"; +$_3 = "\$3"; +$r = $s->exec(); +var_dump($r->fetchAll()); +?> +Done +--EXPECT-- +Test +array(1) { + [0]=> + array(3) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + } +} +array(1) { + [0]=> + array(3) { + [0]=> + string(2) "$1" + [1]=> + string(2) "$2" + [2]=> + string(2) "$3" + } +} +Done -- 2.30.2