fix test if builtin json converter is not available
authorMichael Wallner <mike@php.net>
Fri, 29 May 2015 09:17:49 +0000 (11:17 +0200)
committerMichael Wallner <mike@php.net>
Fri, 29 May 2015 09:17:49 +0000 (11:17 +0200)
tests/conv001.phpt

index 64488b5..8533753 100644 (file)
@@ -131,7 +131,7 @@ $t = new pq\Types($c);
 
 $c->setConverter(new HStoreConverter($t));
 $c->setConverter(new IntVectorConverter($t));
-if (!defined("pq\\Types::JSON")) {
+if (!(defined("pq\\Types::JSON") && defined("pq\\Result::CONV_JSON"))) {
        $c->setConverter(new JSONConverter($t));
 }
 $c->setConverter(new BoxConverter($t));