test
[m6w6/ext-pq] / tests / trans002.phpt
1 --TEST--
2 txn properties
3 --SKIPIF--
4 <?php include "_skipif.inc"; ?>
5 --FILE--
6 <?php
7 echo "Test\n";
8
9 include "_setup.inc";
10
11 $t = new pq\Transaction(new pq\Connection(PQ_DSN));
12 var_dump(
13 $t->connection,
14 $t->isolation,
15 $t->readonly,
16 $t->deferrable
17 );
18
19 $t->isolation = pq\Transaction::SERIALIZABLE;
20 $t->readonly = true;
21 $t->deferrable = true;
22 var_dump(
23 $t->connection,
24 $t->isolation,
25 $t->readonly,
26 $t->deferrable
27 );
28 ?>
29 DONE
30 --EXPECTF--
31 Test
32 object(pq\Connection)#%d (14) {
33 ["status"]=>
34 int(0)
35 ["transactionStatus"]=>
36 int(2)
37 ["socket"]=>
38 resource(%d) of type (stream)
39 ["errorMessage"]=>
40 string(0) ""
41 ["busy"]=>
42 bool(false)
43 ["encoding"]=>
44 string(4) "%s"
45 ["unbuffered"]=>
46 bool(false)
47 ["db"]=>
48 string(4) "%S"
49 ["user"]=>
50 string(4) "%S"
51 ["pass"]=>
52 string(0) "%S"
53 ["host"]=>
54 string(0) "%S"
55 ["port"]=>
56 string(4) "%S"
57 ["options"]=>
58 string(0) "%S"
59 ["eventHandlers"]=>
60 array(0) {
61 }
62 }
63 int(0)
64 bool(false)
65 bool(false)
66 object(pq\Connection)#%d (14) {
67 ["status"]=>
68 int(0)
69 ["transactionStatus"]=>
70 int(2)
71 ["socket"]=>
72 resource(%d) of type (stream)
73 ["errorMessage"]=>
74 string(0) ""
75 ["busy"]=>
76 bool(false)
77 ["encoding"]=>
78 string(4) "%s"
79 ["unbuffered"]=>
80 bool(false)
81 ["db"]=>
82 string(4) "%S"
83 ["user"]=>
84 string(4) "%S"
85 ["pass"]=>
86 string(0) "%S"
87 ["host"]=>
88 string(0) "%S"
89 ["port"]=>
90 string(4) "%S"
91 ["options"]=>
92 string(0) "%S"
93 ["eventHandlers"]=>
94 array(0) {
95 }
96 }
97 int(2)
98 bool(true)
99 bool(true)
100 DONE