Skip to content

Commit c4d0342

Browse files
committed
Merge pull request #74
2 parents 8a62862 + b31ad7c commit c4d0342

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

tests/writeConcern/writeconcern-001.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ var_dump(new MongoDB\Driver\WriteConcern("string", 7000, true, true));
2424
var_dump(new MongoDB\Driver\WriteConcern("string", 8000, true, false));
2525
var_dump(new MongoDB\Driver\WriteConcern("string", 9000, false, true));
2626

27-
try {
28-
new MongoDB\Driver\WriteConcern("string", 10000, false, true, 1);
29-
} catch(InvalidArgumentException $e) {
30-
echo $e->getMessage(), "\n";
31-
}
32-
3327
?>
3428
===DONE===
3529
<?php exit(0); ?>
@@ -178,5 +172,4 @@ object(MongoDB\Driver\WriteConcern)#%d (%d) {
178172
["journal"]=>
179173
bool(false)
180174
}
181-
MongoDB\Driver\WriteConcern::__construct() expects at most 4 parameters, 5 given
182175
===DONE===
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
MongoDB\Driver\WriteConcern construction (invalid arguments)
3+
--SKIPIF--
4+
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
5+
<?php if (defined("HHVM_VERSION_ID")) exit("skip HHVM throws Exception instead of InvalidArgumentException"); ?>
6+
--FILE--
7+
<?php
8+
require_once __DIR__ . "/../utils/basic.inc";
9+
10+
try {
11+
new MongoDB\Driver\WriteConcern("string", 10000, false, true, 1);
12+
} catch(InvalidArgumentException $e) {
13+
echo $e->getMessage(), "\n";
14+
}
15+
16+
?>
17+
===DONE===
18+
<?php exit(0); ?>
19+
--EXPECTF--
20+
MongoDB\Driver\WriteConcern::__construct() expects at most 4 parameters, 5 given
21+
===DONE===

0 commit comments

Comments
 (0)