--TEST-- MongoDB\Driver\WriteConcern debug output --FILE-- 1 new MongoDB\Driver\WriteConcern(-2, 1000), // 64-bit wtimeout may be reported as integer or string MongoDB\Driver\WriteConcern::__set_state(['w' => 2, 'wtimeout' => '2147483648']), ]; foreach ($tests as $test) { var_dump($test); } ?> ===DONE=== --EXPECTF-- object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> string(8) "majority" ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> NULL ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(-1) ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(0) ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(1) ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> string(8) "majority" ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> string(3) "tag" ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(1) ["j"]=> NULL ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(1) ["j"]=> bool(false) ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(1) ["j"]=> NULL ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(1) ["j"]=> bool(true) ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> NULL ["j"]=> bool(true) ["wtimeout"]=> int(0) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> NULL ["j"]=> NULL ["wtimeout"]=> int(1000) } object(MongoDB\Driver\WriteConcern)#%d (3) { ["w"]=> int(2) ["j"]=> NULL ["wtimeout"]=> %rint\(2147483648\)|int\(2147483647\)%r } ===DONE===