From 4822c94ec2704ec8cdf95105485554cca05b2df3 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Mon, 15 Dec 2014 16:19:59 +0000 Subject: [PATCH] Test props with Connection::prepare() as well as Statement ctor --- tests/stm_props001.phpt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/stm_props001.phpt b/tests/stm_props001.phpt index 33a733f..9283293 100644 --- a/tests/stm_props001.phpt +++ b/tests/stm_props001.phpt @@ -9,11 +9,12 @@ include "_skipif.inc"; echo "Test\n"; include "_setup.inc"; -$n = 'props'; $q = 'SELECT $1, $2, $3'; $t = array(pq\Types::BOOL, pq\Types::INT4, pq\Types::TEXT); $c = new pq\Connection(PQ_DSN); + +$n = 'props1'; $s = new pq\Statement($c, $n, $q, $t); var_dump($c === $s->connection); @@ -21,6 +22,14 @@ var_dump($n === $s->name); var_dump($q === $s->query); var_dump($t === $s->types); +$n = 'props2'; +$s = $c->prepare($n, $q, $t); + +var_dump($c === $s->connection); +var_dump($n === $s->name); +var_dump($q === $s->query); +var_dump($t === $s->types); + ?> Done --EXPECT-- @@ -29,4 +38,8 @@ bool(true) bool(true) bool(true) bool(true) +bool(true) +bool(true) +bool(true) +bool(true) Done -- 2.30.2