tests
[m6w6/ext-pq] / tests / stm_desc001.phpt
diff --git a/tests/stm_desc001.phpt b/tests/stm_desc001.phpt
new file mode 100644 (file)
index 0000000..ae3e51a
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+pq\Statment::desc()
+--SKIPIF--
+<?php include "_skipif.inc"; ?>
+--FILE--
+<?php
+echo "Test\n";
+include "_setup.inc";
+
+$c = new pq\Connection(PQ_DSN);
+$s = $c->prepare("test1", "SELECT NOW() - \$1");
+$r = $s->exec(array("2012-12-12 12:12:12"));
+$d = $s->desc();
+
+printf("%s\n", $c->types->byOid->{$d[0]}->typname);
+
+?>
+DONE
+--EXPECT--
+Test
+timestamptz
+DONE