Merge pull request #33 from m6w6/fix-19
[m6w6/ext-pq] / tests / res001.phpt
1 --TEST--
2 empty result
3 --SKIPIF--
4 <?php
5 include "_skipif.inc";
6 ?>
7 --FILE--
8 <?php
9 echo "Test\n";
10
11 include "_setup.inc";
12
13 set_error_handler(function($code, $error, $file, $line) {
14 printf("\nWarning: %s in %s on line %d\n", $error, $file, $line);
15 return true;
16 }, E_RECOVERABLE_ERROR);
17
18 class r extends pq\Result {
19 public $dummy = 2;
20 }
21
22 var_dump(new pq\Result, get_object_vars(new r));
23 ?>
24 Done
25 --EXPECTF--
26 Test
27
28 Warning: pq\Result not initialized in %s on line %d
29
30 Warning: pq\Result not initialized in %s on line %d
31
32 Warning: pq\Result not initialized in %s on line %d
33
34 Warning: pq\Result not initialized in %s on line %d
35
36 Warning: pq\Result not initialized in %s on line %d
37
38 Warning: pq\Result not initialized in %s on line %d
39
40 Warning: pq\Result not initialized in %s on line %d
41
42 Warning: pq\Result not initialized in %s on line %d
43
44 Warning: pq\Result not initialized in %s on line %d
45
46 Warning: pq\Result not initialized in %s on line %d
47
48 Warning: pq\Result not initialized in %s on line %d
49
50 Warning: pq\Result not initialized in %s on line %d
51
52 Warning: pq\Result not initialized in %s on line %d
53
54 Warning: pq\Result not initialized in %s on line %d
55
56 Warning: pq\Result not initialized in %s on line %d
57
58 Warning: pq\Result not initialized in %s on line %d
59
60 Warning: pq\Result not initialized in %s on line %d
61
62 Warning: pq\Result not initialized in %s on line %d
63
64 Warning: pq\Result not initialized in %s on line %d
65 object(pq\Result)#%d (9) {
66 ["status"]=>
67 NULL
68 ["statusMessage"]=>
69 NULL
70 ["errorMessage"]=>
71 NULL
72 ["diag"]=>
73 NULL
74 ["numRows"]=>
75 int(0)
76 ["numCols"]=>
77 int(0)
78 ["affectedRows"]=>
79 int(0)
80 ["fetchType"]=>
81 int(0)
82 ["autoConvert"]=>
83 int(65535)
84 }
85 array(10) {
86 ["dummy"]=>
87 int(2)
88 ["status"]=>
89 NULL
90 ["statusMessage"]=>
91 NULL
92 ["errorMessage"]=>
93 NULL
94 ["diag"]=>
95 NULL
96 ["numRows"]=>
97 int(0)
98 ["numCols"]=>
99 int(0)
100 ["affectedRows"]=>
101 int(0)
102 ["fetchType"]=>
103 int(0)
104 ["autoConvert"]=>
105 int(65535)
106 }
107 Done