From: Chris Wright Date: Mon, 15 Dec 2014 16:19:59 +0000 (+0000) Subject: Test props with Connection::prepare() as well as Statement ctor X-Git-Tag: v0.6.0RC1~18 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=4822c94ec2704ec8cdf95105485554cca05b2df3;p=m6w6%2Fext-pq Test props with Connection::prepare() as well as Statement ctor --- 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