Skip to content

Commit 11d823f

Browse files
committed
PHPC-498: Fix expected output for ReadPreference and WriteConcern
These test fixes were missed in #413.
1 parent fd79c3e commit 11d823f

File tree

3 files changed

+7
-36
lines changed

3 files changed

+7
-36
lines changed

tests/readPreference/bug0146-001.phpt

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
6363
["readPreference"]=>
6464
object(MongoDB\Driver\ReadPreference)#%d (%d) {
6565
["mode"]=>
66-
int(1)
67-
["tags"]=>
68-
array(0) {
69-
}
66+
string(7) "primary"
7067
}
7168
["isDead"]=>
7269
bool(true)
@@ -112,10 +109,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
112109
["readPreference"]=>
113110
object(MongoDB\Driver\ReadPreference)#%d (%d) {
114111
["mode"]=>
115-
int(5)
116-
["tags"]=>
117-
array(0) {
118-
}
112+
string(16) "primaryPreferred"
119113
}
120114
["isDead"]=>
121115
bool(true)
@@ -161,10 +155,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
161155
["readPreference"]=>
162156
object(MongoDB\Driver\ReadPreference)#%d (%d) {
163157
["mode"]=>
164-
int(2)
165-
["tags"]=>
166-
array(0) {
167-
}
158+
string(9) "secondary"
168159
}
169160
["isDead"]=>
170161
bool(true)
@@ -210,10 +201,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
210201
["readPreference"]=>
211202
object(MongoDB\Driver\ReadPreference)#%d (%d) {
212203
["mode"]=>
213-
int(6)
214-
["tags"]=>
215-
array(0) {
216-
}
204+
string(18) "secondaryPreferred"
217205
}
218206
["isDead"]=>
219207
bool(true)
@@ -259,10 +247,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
259247
["readPreference"]=>
260248
object(MongoDB\Driver\ReadPreference)#%d (%d) {
261249
["mode"]=>
262-
int(10)
263-
["tags"]=>
264-
array(0) {
265-
}
250+
string(7) "nearest"
266251
}
267252
["isDead"]=>
268253
bool(true)

tests/replicaset/writeresult-getserver-002.phpt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,7 @@ object(MongoDB\Driver\WriteResult)#%d (%d) {
7979
["writeConcernError"]=>
8080
NULL
8181
["writeConcern"]=>
82-
array(%d) {
83-
["w"]=>
84-
NULL
85-
["wmajority"]=>
86-
bool(false)
87-
["wtimeout"]=>
88-
int(0)
89-
["journal"]=>
90-
NULL
82+
array(0) {
9183
}
9284
}
9385
string(14) "192.168.112.10"

tests/writeResult/writeresult-debug-002.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,9 @@ object(MongoDB\Driver\WriteResult)#%d (%d) {
100100
string(29) "Not enough data-bearing nodes"
101101
}
102102
["writeConcern"]=>
103-
array(4) {
103+
array(1) {
104104
["w"]=>
105105
int(30)
106-
["wmajority"]=>
107-
bool(false)
108-
["wtimeout"]=>
109-
int(0)
110-
["journal"]=>
111-
NULL
112106
}
113107
}
114108
===DONE===

0 commit comments

Comments
 (0)