<file role="test" name="async010.phpt" />
<file role="test" name="basic001.phpt" />
<file role="test" name="basic002.phpt" />
+ <file role="test" name="basic003.phpt" />
<file role="test" name="bound002.phpt" />
<file role="test" name="callback001.phpt" />
<file role="test" name="callback002.phpt" />
include "_setup.inc";
defined("PQ_DSN") or die("skip PQ_DSN undefined");
try {
- new pq\Connection(PQ_DSN);
+ $c = new pq\Connection(PQ_DSN);
+ if (defined("SERVER_MIN") && version_compare(SERVER_MIN, $c->serverVersion) > 0) {
+ die("skip server {$c->serverVersion} is too old, needed " . SERVER_MIN);
+ }
} catch (pq\Exception $e) {
die("skip could not connect to PQ_DSN ".$e->getMessage());
}
--- /dev/null
+--TEST--
+basic functionality
+--SKIPIF--
+<?php include "_skipif.inc"; ?>
+--FILE--
+<?php
+echo "Test\n";
+include "_setup.inc";
+
+$c = new pq\Connection(PQ_DSN);
+
+var_dump($c->libraryVersion);
+var_dump($c->protocolVersion);
+var_dump($c->serverVersion);
+?>
+DONE
+--EXPECTF--
+Test
+string(%d) "%s"
+int(%d)
+string(%d) "%s"
+DONE
json conv broken since 2.2.1
--SKIPIF--
<?php
+define("SERVER_MIN", "9.4");
include "_skipif.inc";
?>
--INI--