Skip to content

Commit 4d6157f

Browse files
bjorijmikola
authored andcommitted
$readPreferences should not be sent to standalone server
1 parent ff3061d commit 4d6157f

File tree

1 file changed

+4
-36
lines changed

1 file changed

+4
-36
lines changed

tests/readPreference/bug0146.phpt

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,12 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
104104
["has_fields"]=>
105105
bool(false)
106106
["query"]=>
107-
object(stdClass)#%d (2) {
107+
object(stdClass)#%d (%d) {
108108
["$query"]=>
109109
object(stdClass)#%d (%d) {
110110
["my"]=>
111111
string(5) "query"
112112
}
113-
["$readPreference"]=>
114-
object(stdClass)#%d (%d) {
115-
["mode"]=>
116-
string(16) "primaryPreferred"
117-
["tags"]=>
118-
array(0) {
119-
}
120-
}
121113
}
122114
["fields"]=>
123115
object(stdClass)#%d (0) {
@@ -168,20 +160,12 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
168160
["has_fields"]=>
169161
bool(false)
170162
["query"]=>
171-
object(stdClass)#%d (2) {
163+
object(stdClass)#%d (%d) {
172164
["$query"]=>
173165
object(stdClass)#%d (%d) {
174166
["my"]=>
175167
string(5) "query"
176168
}
177-
["$readPreference"]=>
178-
object(stdClass)#%d (%d) {
179-
["mode"]=>
180-
string(9) "secondary"
181-
["tags"]=>
182-
array(0) {
183-
}
184-
}
185169
}
186170
["fields"]=>
187171
object(stdClass)#%d (0) {
@@ -232,20 +216,12 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
232216
["has_fields"]=>
233217
bool(false)
234218
["query"]=>
235-
object(stdClass)#%d (2) {
219+
object(stdClass)#%d (%d) {
236220
["$query"]=>
237221
object(stdClass)#%d (%d) {
238222
["my"]=>
239223
string(5) "query"
240224
}
241-
["$readPreference"]=>
242-
object(stdClass)#%d (%d) {
243-
["mode"]=>
244-
string(18) "secondaryPreferred"
245-
["tags"]=>
246-
array(0) {
247-
}
248-
}
249225
}
250226
["fields"]=>
251227
object(stdClass)#%d (0) {
@@ -296,20 +272,12 @@ object(MongoDB\Driver\Cursor)#%d (%d) {
296272
["has_fields"]=>
297273
bool(false)
298274
["query"]=>
299-
object(stdClass)#%d (2) {
275+
object(stdClass)#%d (%d) {
300276
["$query"]=>
301277
object(stdClass)#%d (%d) {
302278
["my"]=>
303279
string(5) "query"
304280
}
305-
["$readPreference"]=>
306-
object(stdClass)#%d (%d) {
307-
["mode"]=>
308-
string(7) "nearest"
309-
["tags"]=>
310-
array(0) {
311-
}
312-
}
313281
}
314282
["fields"]=>
315283
object(stdClass)#%d (0) {

0 commit comments

Comments
 (0)