Annotation of embedaddon/php/ext/pgsql/tests/bug64609.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #64609 (pg_convert enum type support)
! 3: --SKIPIF--
! 4: <?php
! 5: include("skipif.inc");
! 6: skip_server_version('8.3', '<');
! 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("BEGIN");
! 16: pg_query("CREATE TYPE t_enum AS ENUM ('ok', 'ko')");
! 17: pg_query("CREATE TABLE test_enum (a t_enum)");
! 18:
! 19: $fields = array('a' => 'ok');
! 20: $converted = pg_convert($db, 'test_enum', $fields);
! 21:
! 22: pg_query("ROLLBACK");
! 23:
! 24: var_dump($converted);
! 25: ?>
! 26: --EXPECT--
! 27: array(1) {
! 28: ["a"]=>
! 29: string(4) "'ok'"
! 30: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>