Skip to content

Commit 380aee3

Browse files
committed
Additional tests for WriteConcern debug handler
1 parent a6932d5 commit 380aee3

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
--TEST--
2+
MongoDB\Driver\WriteConcern debug output
3+
--SKIPIF--
4+
<?php require __DIR__ . "/../utils/basic-skipif.inc"?>
5+
--FILE--
6+
<?php
7+
require_once __DIR__ . "/../utils/basic.inc";
8+
9+
var_dump(new MongoDB\Driver\WriteConcern(1));
10+
var_dump(new MongoDB\Driver\WriteConcern("tag", 1000, false, false));
11+
var_dump(new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY, 500, true, true));
12+
13+
?>
14+
===DONE===
15+
<?php exit(0); ?>
16+
--EXPECTF--
17+
object(MongoDB\Driver\WriteConcern)#%d (%d) {
18+
["w"]=>
19+
int(1)
20+
["wmajority"]=>
21+
bool(false)
22+
["wtimeout"]=>
23+
int(0)
24+
["fsync"]=>
25+
NULL
26+
["journal"]=>
27+
NULL
28+
}
29+
object(MongoDB\Driver\WriteConcern)#%d (%d) {
30+
["w"]=>
31+
string(3) "tag"
32+
["wmajority"]=>
33+
bool(false)
34+
["wtimeout"]=>
35+
int(1000)
36+
["fsync"]=>
37+
bool(false)
38+
["journal"]=>
39+
bool(false)
40+
}
41+
object(MongoDB\Driver\WriteConcern)#%d (%d) {
42+
["w"]=>
43+
string(8) "majority"
44+
["wmajority"]=>
45+
bool(true)
46+
["wtimeout"]=>
47+
int(500)
48+
["fsync"]=>
49+
bool(true)
50+
["journal"]=>
51+
bool(true)
52+
}
53+
===DONE===

0 commit comments

Comments
 (0)