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/gh12763.phpt
Dmitry Stogov e2e433a514 Fix test
2023-11-28 02:00:47 +03:00

24 lines
523 B
PHP

--TEST--
Bug #GH12763 (pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given)
--EXTENSIONS--
pgsql
--SKIPIF--
<?php include("inc/skipif.inc"); ?>
--FILE--
<?php
include('inc/config.inc');
$conn = pg_connect($conn_str);
$file_name = tempnam('.', 'trace.log');
pg_trace($file_name, 'w', $conn);
pg_query($conn, 'select 1 as a');
pg_untrace($conn);
$items = explode("\n", file_get_contents($file_name));
unlink($file_name);
echo isset($items[0]) ? 'OK' : 'FAIL';
?>
--EXPECT--
OK