prepare v2.2.3
[m6w6/ext-pq] / tests / res001.phpt
index 89e0512655e4d30f0105938c0a355decca0c1196..a3252475839ade683a1db91662cc24f87a9f31f5 100644 (file)
@@ -10,11 +10,22 @@ echo "Test\n";
 
 include "_setup.inc";
 
+set_error_handler(function($code, $error, $file, $line) {
+       printf("\nWarning: %s in %s on line %d\n", $error, $file, $line);
+       return true;
+}, E_RECOVERABLE_ERROR);
+
 class r extends pq\Result {
        public $dummy = 2;
 }
 
-var_dump(new pq\Result, get_object_vars(new r));
+var_dump(new pq\Result);
+
+echo "Test\n";
+$v = get_object_vars(new r);
+ksort($v);
+var_dump($v);
+
 ?>
 Done
 --EXPECTF--
@@ -37,25 +48,15 @@ Warning: pq\Result not initialized in %s on line %d
 Warning: pq\Result not initialized in %s on line %d
 
 Warning: pq\Result not initialized in %s on line %d
-
-Warning: pq\Result not initialized in %s on line %d
-
-Warning: pq\Result not initialized in %s on line %d
-
-Warning: pq\Result not initialized in %s on line %d
-
-Warning: pq\Result not initialized in %s on line %d
-
-Warning: pq\Result not initialized in %s on line %d
-
-Warning: pq\Result not initialized in %s on line %d
-object(pq\Result)#%d (7) {
+object(pq\Result)#%d (9) {
   ["status"]=>
   NULL
   ["statusMessage"]=>
   NULL
   ["errorMessage"]=>
   NULL
+  ["diag"]=>
+  NULL
   ["numRows"]=>
   int(0)
   ["numCols"]=>
@@ -64,23 +65,50 @@ object(pq\Result)#%d (7) {
   int(0)
   ["fetchType"]=>
   int(0)
+  ["autoConvert"]=>
+  int(65535)
 }
-array(8) {
+Test
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+
+Warning: pq\Result not initialized in %s on line %d
+array(10) {
+  ["affectedRows"]=>
+  int(0)
+  ["autoConvert"]=>
+  int(65535)
+  ["diag"]=>
+  NULL
   ["dummy"]=>
   int(2)
-  ["status"]=>
-  NULL
-  ["statusMessage"]=>
-  NULL
   ["errorMessage"]=>
   NULL
-  ["numRows"]=>
+  ["fetchType"]=>
   int(0)
   ["numCols"]=>
   int(0)
-  ["affectedRows"]=>
-  int(0)
-  ["fetchType"]=>
+  ["numRows"]=>
   int(0)
+  ["status"]=>
+  NULL
+  ["statusMessage"]=>
+  NULL
 }
 Done