From 11d823f8cd19fd77ec465507a2c0c41ba4a5878c Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 19 Sep 2016 16:52:38 -0400 Subject: [PATCH] PHPC-498: Fix expected output for ReadPreference and WriteConcern These test fixes were missed in mongodb/mongo-php-driver#413. --- tests/readPreference/bug0146-001.phpt | 25 ++++--------------- .../replicaset/writeresult-getserver-002.phpt | 10 +------- tests/writeResult/writeresult-debug-002.phpt | 8 +----- 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/tests/readPreference/bug0146-001.phpt b/tests/readPreference/bug0146-001.phpt index e34b4afff..5c05169cc 100644 --- a/tests/readPreference/bug0146-001.phpt +++ b/tests/readPreference/bug0146-001.phpt @@ -63,10 +63,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> - int(1) - ["tags"]=> - array(0) { - } + string(7) "primary" } ["isDead"]=> bool(true) @@ -112,10 +109,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> - int(5) - ["tags"]=> - array(0) { - } + string(16) "primaryPreferred" } ["isDead"]=> bool(true) @@ -161,10 +155,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> - int(2) - ["tags"]=> - array(0) { - } + string(9) "secondary" } ["isDead"]=> bool(true) @@ -210,10 +201,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> - int(6) - ["tags"]=> - array(0) { - } + string(18) "secondaryPreferred" } ["isDead"]=> bool(true) @@ -259,10 +247,7 @@ object(MongoDB\Driver\Cursor)#%d (%d) { ["readPreference"]=> object(MongoDB\Driver\ReadPreference)#%d (%d) { ["mode"]=> - int(10) - ["tags"]=> - array(0) { - } + string(7) "nearest" } ["isDead"]=> bool(true) diff --git a/tests/replicaset/writeresult-getserver-002.phpt b/tests/replicaset/writeresult-getserver-002.phpt index f278b19ed..80b807310 100644 --- a/tests/replicaset/writeresult-getserver-002.phpt +++ b/tests/replicaset/writeresult-getserver-002.phpt @@ -79,15 +79,7 @@ object(MongoDB\Driver\WriteResult)#%d (%d) { ["writeConcernError"]=> NULL ["writeConcern"]=> - array(%d) { - ["w"]=> - NULL - ["wmajority"]=> - bool(false) - ["wtimeout"]=> - int(0) - ["journal"]=> - NULL + array(0) { } } string(14) "192.168.112.10" diff --git a/tests/writeResult/writeresult-debug-002.phpt b/tests/writeResult/writeresult-debug-002.phpt index 7100e1d19..bf6ebf11d 100644 --- a/tests/writeResult/writeresult-debug-002.phpt +++ b/tests/writeResult/writeresult-debug-002.phpt @@ -100,15 +100,9 @@ object(MongoDB\Driver\WriteResult)#%d (%d) { string(29) "Not enough data-bearing nodes" } ["writeConcern"]=> - array(4) { + array(1) { ["w"]=> int(30) - ["wmajority"]=> - bool(false) - ["wtimeout"]=> - int(0) - ["journal"]=> - NULL } } ===DONE===