diff options
Diffstat (limited to 'ext/pgsql/tests/10pg_convert_9.phpt')
-rw-r--r-- | ext/pgsql/tests/10pg_convert_9.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/pgsql/tests/10pg_convert_9.phpt b/ext/pgsql/tests/10pg_convert_9.phpt new file mode 100644 index 000000000..827c96250 --- /dev/null +++ b/ext/pgsql/tests/10pg_convert_9.phpt @@ -0,0 +1,30 @@ +--TEST-- +PostgreSQL pg_convert() (9.0+) +--SKIPIF-- +<?php +include("skipif.inc"); +skip_bytea_not_hex(); +?> +--FILE-- +<?php +error_reporting(E_ALL); + +include 'config.inc'; + +$db = pg_connect($conn_str); +pg_query($db, "SET standard_conforming_strings = 0"); + +$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB'); +$converted = pg_convert($db, $table_name, $fields); + +var_dump($converted); +?> +--EXPECT-- +array(3) { + [""num""]=> + string(4) "1234" + [""str""]=> + string(6) "E'AAA'" + [""bin""]=> + string(12) "E'\\x424242'" +}
\ No newline at end of file |