prepare v2.2.3
[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);
23
24 echo "Test\n";
25 $v = get_object_vars(new r);
26 ksort($v);
27 var_dump($v);
28
29 ?>
30 Done
31 --EXPECTF--
32 Test
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 object(pq\Result)#%d (9) {
52 ["status"]=>
53 NULL
54 ["statusMessage"]=>
55 NULL
56 ["errorMessage"]=>
57 NULL
58 ["diag"]=>
59 NULL
60 ["numRows"]=>
61 int(0)
62 ["numCols"]=>
63 int(0)
64 ["affectedRows"]=>
65 int(0)
66 ["fetchType"]=>
67 int(0)
68 ["autoConvert"]=>
69 int(65535)
70 }
71 Test
72
73 Warning: pq\Result not initialized in %s on line %d
74
75 Warning: pq\Result not initialized in %s on line %d
76
77 Warning: pq\Result not initialized in %s on line %d
78
79 Warning: pq\Result not initialized in %s on line %d
80
81 Warning: pq\Result not initialized in %s on line %d
82
83 Warning: pq\Result not initialized in %s on line %d
84
85 Warning: pq\Result not initialized in %s on line %d
86
87 Warning: pq\Result not initialized in %s on line %d
88
89 Warning: pq\Result not initialized in %s on line %d
90
91 Warning: pq\Result not initialized in %s on line %d
92 array(10) {
93 ["affectedRows"]=>
94 int(0)
95 ["autoConvert"]=>
96 int(65535)
97 ["diag"]=>
98 NULL
99 ["dummy"]=>
100 int(2)
101 ["errorMessage"]=>
102 NULL
103 ["fetchType"]=>
104 int(0)
105 ["numCols"]=>
106 int(0)
107 ["numRows"]=>
108 int(0)
109 ["status"]=>
110 NULL
111 ["statusMessage"]=>
112 NULL
113 }
114 Done