iliaa           Wed Aug 27 20:29:45 2003 EDT

  Modified files:              
    /php-src/ext/pgsql/tests    05large_object.phpt 08escape.phpt 
                                11pg_meta_data.phpt 18pg_escape_bytea.phpt 
  Log:
  Fixed tests that failed in ZTS due to incorrect file paths.
  Fixed test that failed due to new array dimension property being fetched.
  
  
Index: php-src/ext/pgsql/tests/05large_object.phpt
diff -u php-src/ext/pgsql/tests/05large_object.phpt:1.3 
php-src/ext/pgsql/tests/05large_object.phpt:1.4
--- php-src/ext/pgsql/tests/05large_object.phpt:1.3     Fri May 30 12:51:00 2003
+++ php-src/ext/pgsql/tests/05large_object.phpt Wed Aug 27 20:29:44 2003
@@ -55,16 +55,17 @@
 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');
[EMAIL PROTECTED]('php.gif.exported');
-pg_lo_export($oid, 'php.gif.exported', $db);
-if (!file_exists('php.gif.exported')) {
[EMAIL PROTECTED]($path . 'php.gif.exported');
+pg_lo_export($oid, $path . 'php.gif.exported', $db);
+if (!file_exists($path . 'php.gif.exported')) {
        echo "Export failed\n";
 }
[EMAIL PROTECTED]('php.gif.exported');
[EMAIL PROTECTED]($path . 'php.gif.exported');
 pg_query($db, 'commit');
 
 echo "OK";
Index: php-src/ext/pgsql/tests/08escape.phpt
diff -u php-src/ext/pgsql/tests/08escape.phpt:1.5 
php-src/ext/pgsql/tests/08escape.phpt:1.6
--- php-src/ext/pgsql/tests/08escape.phpt:1.5   Mon May 19 20:14:46 2003
+++ php-src/ext/pgsql/tests/08escape.phpt       Wed Aug 27 20:29:44 2003
@@ -6,7 +6,7 @@
 <?php
 
 include 'config.inc';
-define('FILE_NAME', './php.gif');
+define('FILE_NAME', dirname(__FILE__) . '/php.gif');
 
 // pg_escape_string() test
 $before = "ABC\\ABC\'";
@@ -37,8 +37,7 @@
 }
 
 // Test using database
-$fp   = fopen(FILE_NAME,'r');
-$data = fread($fp, filesize(FILE_NAME));
+$data = file_get_contents(FILE_NAME);
 $db   = pg_connect($conn_str);
 
 // Insert binary to DB
Index: php-src/ext/pgsql/tests/11pg_meta_data.phpt
diff -u php-src/ext/pgsql/tests/11pg_meta_data.phpt:1.2 
php-src/ext/pgsql/tests/11pg_meta_data.phpt:1.3
--- php-src/ext/pgsql/tests/11pg_meta_data.phpt:1.2     Mon May 19 20:14:46 2003
+++ php-src/ext/pgsql/tests/11pg_meta_data.phpt Wed Aug 27 20:29:44 2003
@@ -17,7 +17,7 @@
 --EXPECT--
 array(3) {
   ["num"]=>
-  array(5) {
+  array(6) {
     ["num"]=>
     int(1)
     ["type"]=>
@@ -28,9 +28,11 @@
     bool(false)
     ["has default"]=>
     bool(false)
+    ["array dims"]=>
+    int(0)
   }
   ["str"]=>
-  array(5) {
+  array(6) {
     ["num"]=>
     int(2)
     ["type"]=>
@@ -41,9 +43,11 @@
     bool(false)
     ["has default"]=>
     bool(false)
+    ["array dims"]=>
+    int(0)
   }
   ["bin"]=>
-  array(5) {
+  array(6) {
     ["num"]=>
     int(3)
     ["type"]=>
@@ -54,5 +58,7 @@
     bool(false)
     ["has default"]=>
     bool(false)
+    ["array dims"]=>
+    int(0)
   }
 }
Index: php-src/ext/pgsql/tests/18pg_escape_bytea.phpt
diff -u php-src/ext/pgsql/tests/18pg_escape_bytea.phpt:1.2 
php-src/ext/pgsql/tests/18pg_escape_bytea.phpt:1.3
--- php-src/ext/pgsql/tests/18pg_escape_bytea.phpt:1.2  Mon May 19 20:14:46 2003
+++ php-src/ext/pgsql/tests/18pg_escape_bytea.phpt      Wed Aug 27 20:29:44 2003
@@ -8,8 +8,7 @@
 
 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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to