From: Ilia Alshanetsky Date: Thu, 28 Aug 2003 00:29:44 +0000 (+0000) Subject: Fixed tests that failed in ZTS due to incorrect file paths. X-Git-Tag: RELEASE_0_7~434 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5879a50603a22ef5de3e457aff31ec96b30f83c;p=php Fixed tests that failed in ZTS due to incorrect file paths. Fixed test that failed due to new array dimension property being fetched. --- diff --git a/ext/pgsql/tests/05large_object.phpt b/ext/pgsql/tests/05large_object.phpt index fe33299585..a6f30195ae 100644 --- a/ext/pgsql/tests/05large_object.phpt +++ b/ext/pgsql/tests/05large_object.phpt @@ -55,16 +55,17 @@ pg_lo_unlink($db, (string)$oid) or print("pg_lo_unlink() error 3\n"); pg_exec ($db, "commit"); echo "import/export LO\n"; +$path = dirname(__FILE__) . '/'; pg_query($db, 'begin'); -$oid = pg_lo_import($db, 'php.gif'); +$oid = pg_lo_import($db, $path . 'php.gif'); pg_query($db, 'commit'); pg_query($db, 'begin'); -@unlink('php.gif.exported'); -pg_lo_export($oid, 'php.gif.exported', $db); -if (!file_exists('php.gif.exported')) { +@unlink($path . 'php.gif.exported'); +pg_lo_export($oid, $path . 'php.gif.exported', $db); +if (!file_exists($path . 'php.gif.exported')) { echo "Export failed\n"; } -@unlink('php.gif.exported'); +@unlink($path . 'php.gif.exported'); pg_query($db, 'commit'); echo "OK"; diff --git a/ext/pgsql/tests/08escape.phpt b/ext/pgsql/tests/08escape.phpt index aa24a4512e..c5a3877e37 100644 --- a/ext/pgsql/tests/08escape.phpt +++ b/ext/pgsql/tests/08escape.phpt @@ -6,7 +6,7 @@ PostgreSQL escape functions - array(5) { + array(6) { ["num"]=> int(1) ["type"]=> @@ -28,9 +28,11 @@ array(3) { bool(false) ["has default"]=> bool(false) + ["array dims"]=> + int(0) } ["str"]=> - array(5) { + array(6) { ["num"]=> int(2) ["type"]=> @@ -41,9 +43,11 @@ array(3) { bool(false) ["has default"]=> bool(false) + ["array dims"]=> + int(0) } ["bin"]=> - array(5) { + array(6) { ["num"]=> int(3) ["type"]=> @@ -54,5 +58,7 @@ array(3) { bool(false) ["has default"]=> bool(false) + ["array dims"]=> + int(0) } } diff --git a/ext/pgsql/tests/18pg_escape_bytea.phpt b/ext/pgsql/tests/18pg_escape_bytea.phpt index 312c7e2f6b..43f98c4467 100644 --- a/ext/pgsql/tests/18pg_escape_bytea.phpt +++ b/ext/pgsql/tests/18pg_escape_bytea.phpt @@ -8,8 +8,7 @@ PostgreSQL pg_escape_bytea() functions include('config.inc'); -$fp = fopen('php.gif', 'r'); -$image = fread($fp, filesize('php.gif')); +$image = file_get_contents(dirname(__FILE__) . '/php.gif'); $esc_image = pg_escape_bytea($image); $db = pg_connect($conn_str);