xref: /PHP-7.2/ext/pgsql/tests/10pg_convert.phpt (revision f1d7e3ca)
1--TEST--
2PostgreSQL pg_convert()
3--SKIPIF--
4<?php
5include("skipif.inc");
6skip_bytea_not_escape();
7?>
8--FILE--
9<?php
10error_reporting(E_ALL);
11
12include 'config.inc';
13
14$db = pg_connect($conn_str);
15
16$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB');
17$converted = pg_convert($db, $table_name, $fields);
18
19var_dump($converted);
20?>
21--EXPECT--
22array(3) {
23  [""num""]=>
24  string(4) "1234"
25  [""str""]=>
26  string(6) "E'AAA'"
27  [""bin""]=>
28  string(6) "E'BBB'"
29}
30