diff options
| author | Matteo Beccati <mbeccati@php.net> | 2013-06-02 06:29:35 +0200 |
|---|---|---|
| committer | Matteo Beccati <mbeccati@php.net> | 2013-06-02 06:29:35 +0200 |
| commit | 25aae37229a439109c020150d0f496ef4a237ecd (patch) | |
| tree | 25084440acdf18bc02f760c260a09040845c6c01 /ext/pgsql/tests/bug64609.phpt | |
| parent | 79803bebdea2827d66c0f96fd3dbaf4a2747ff27 (diff) | |
| download | php-git-25aae37229a439109c020150d0f496ef4a237ecd.tar.gz | |
Fixed bug #64609 (pg_convert enum type support)
Diffstat (limited to 'ext/pgsql/tests/bug64609.phpt')
| -rw-r--r-- | ext/pgsql/tests/bug64609.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/pgsql/tests/bug64609.phpt b/ext/pgsql/tests/bug64609.phpt new file mode 100644 index 0000000000..0df63012da --- /dev/null +++ b/ext/pgsql/tests/bug64609.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #64609 (pg_convert enum type support) +--SKIPIF-- +<?php +include("skipif.inc"); +skip_server_version('8.3', '<'); +?> +--FILE-- +<?php +error_reporting(E_ALL); + +include 'config.inc'; + +$db = pg_connect($conn_str); +pg_query("BEGIN"); +pg_query("CREATE TYPE t_enum AS ENUM ('ok', 'ko')"); +pg_query("CREATE TABLE test_enum (a t_enum)"); + +$fields = array('a' => 'ok'); +$converted = pg_convert($db, 'test_enum', $fields); + +pg_query("ROLLBACK"); + +var_dump($converted); +?> +--EXPECT-- +array(1) { + ["a"]=> + string(4) "'ok'" +} |
