1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/pgsql/tests/10pg_convert.phpt
KentarouTakeda c15988aab3 ext/pgsql: Refactor tests (#12608)
This makes the tests independent of each other and allows them to be run in parallel.

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2023-11-06 22:36:52 +00:00

32 lines
488 B
PHP

--TEST--
PostgreSQL pg_convert()
--EXTENSIONS--
pgsql
--SKIPIF--
<?php
include("inc/skipif.inc");
skip_bytea_not_escape();
?>
--FILE--
<?php
error_reporting(E_ALL);
include 'inc/config.inc';
$db = pg_connect($conn_str);
$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(6) "E'BBB'"
}