Annotation of embedaddon/php/ext/pgsql/tests/10pg_convert_9.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: PostgreSQL pg_convert() (9.0+)
! 3: --SKIPIF--
! 4: <?php
! 5: include("skipif.inc");
! 6: skip_bytea_not_hex();
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: error_reporting(E_ALL);
! 11:
! 12: include 'config.inc';
! 13:
! 14: $db = pg_connect($conn_str);
! 15: pg_query($db, "SET standard_conforming_strings = 0");
! 16:
! 17: $fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB');
! 18: $converted = pg_convert($db, $table_name, $fields);
! 19:
! 20: var_dump($converted);
! 21: ?>
! 22: --EXPECT--
! 23: array(3) {
! 24: [""num""]=>
! 25: string(4) "1234"
! 26: [""str""]=>
! 27: string(6) "E'AAA'"
! 28: [""bin""]=>
! 29: string(12) "E'\\x424242'"
! 30: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>