Skip to content

Commit

Permalink
test #47
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed May 3, 2023
1 parent 50d036f commit 9ff77f9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/gh-issue047_jsonb.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
--TEST--
json conv broken since 2.2.1
--SKIPIF--
<?php
include "_skipif.inc";
?>
--INI--
date.timezone=UTC
--FILE--
<?php
echo "Test\n";

include "_setup.inc";

$c = new pq\Connection(PQ_DSN);
$c->defaultFetchType = \pq\Result::FETCH_ASSOC;

$q = <<<EOF
SELECT '0'::jsonb UNION SELECT '"text"'::jsonb;
EOF;
$r = $c->exec($q);

var_dump($r->fetchAll());
?>
===DONE===
--EXPECT--
Test
array(2) {
[0]=>
array(1) {
["jsonb"]=>
string(4) "text"
}
[1]=>
array(1) {
["jsonb"]=>
int(0)
}
}
===DONE===

0 comments on commit 9ff77f9

Please sign in to comment.