projects
/
m6w6
/
ext-pq
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
test #47
[m6w6/ext-pq]
/
tests
/
gh-issue047_jsonb.phpt
1
--TEST--
2
json conv broken since 2.2.1
3
--SKIPIF--
4
<?php
5
include "_skipif.inc";
6
?>
7
--INI--
8
date.timezone=UTC
9
--FILE--
10
<?php
11
echo "Test\n";
12
13
include "_setup.inc";
14
15
$c = new pq\Connection(PQ_DSN);
16
$c->defaultFetchType = \pq\Result::FETCH_ASSOC;
17
18
$q = <<<EOF
19
SELECT '0'::jsonb UNION SELECT '"text"'::jsonb;
20
EOF;
21
$r = $c->exec($q);
22
23
var_dump($r->fetchAll());
24
?>
25
===DONE===
26
--EXPECT--
27
Test
28
array(2) {
29
[0]=>
30
array(1) {
31
["jsonb"]=>
32
string(4) "text"
33
}
34
[1]=>
35
array(1) {
36
["jsonb"]=>
37
int(0)
38
}
39
}
40
===DONE===