1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-11-30 04:19:49 +01:00

Test props with Connection::prepare() as well as Statement ctor

This commit is contained in:
Chris Wright 2014-12-15 16:19:59 +00:00
parent db9b923fd2
commit 4822c94ec2

View File

@ -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