From: Michael Wallner Date: Tue, 14 May 2013 12:41:15 +0000 (+0200) Subject: test Statement::bind() X-Git-Tag: v0.4.0~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=569c22fcb5e97f38f8a9cff361a8ea4c8d5bdd1e;p=m6w6%2Fext-pq test Statement::bind() --- 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