1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/pgsql/tests/pg_trace.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

27 lines
452 B
PHP

--TEST--
pg_trace
--EXTENSIONS--
pgsql
--SKIPIF--
<?php include("inc/skipif.inc"); ?>
--FILE--
<?php
include('inc/config.inc');
$db = pg_connect($conn_str);
$tracefile = __DIR__ . '/trace.tmp';
try {
pg_trace($tracefile, 'w', $db, 56432);
} catch (ValueError $e) {
echo $e->getMessage() . PHP_EOL;
}
var_dump(pg_trace($tracefile, 'w', $db, 0));
$res = pg_query($db, 'SELECT 1');
?>
--EXPECTF--
pg_trace(): Argument #4 ($trace_mode) %s
bool(true)