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