Skip to content

Commit 177efe9

Browse files
committed
Merge pull request #851
2 parents 4db394a + 476c7f9 commit 177efe9

7 files changed

+7
-51
lines changed

Diff for: tests/apm/monitoring-commandFailed-003.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ try {
4848
--EXPECTF--
4949
started: findAndModify
5050
failed: findAndModify
51-
object(stdClass)#%d (%d) {
51+
object(stdClass)#%d (%d) {%A
5252
["ok"]=>
5353
float(0)
5454
["errmsg"]=>

Diff for: tests/apm/overview.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ object(MongoDB\Driver\Monitoring\CommandFailedEvent)#%d (%d) {
9292
["operationId"]=>
9393
string(%d) "%s"
9494
["reply"]=>
95-
object(stdClass)#%d (%d) {
95+
object(stdClass)#%d (%d) {%A
9696
["ok"]=>
9797
float(0)
9898
["errmsg"]=>

Diff for: tests/bulk/write-0001.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ object(MongoDB\Driver\BulkWrite)#%d (%d) {
116116
["executed"]=>
117117
bool(true)
118118
["server_id"]=>
119-
int(1)
119+
int(%r[1-9]\d*%r)
120120
["write_concern"]=>
121121
NULL
122122
}

Diff for: tests/bulk/write-0002.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ object(MongoDB\Driver\BulkWrite)#%d (%d) {
6464
["executed"]=>
6565
bool(true)
6666
["server_id"]=>
67-
int(1)
67+
int(%r[1-9]\d*%r)
6868
["write_concern"]=>
6969
array(%d) {
7070
["w"]=>

Diff for: tests/command/cursor-tailable-001.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@ object(stdClass)#%d (%d) {
6767
Waited for 0.%d seconds
6868
Awaiting results...
6969
NULL
70-
Waited for 0.5%d seconds
70+
Waited for 0.%r(4|5)\d*%r seconds
7171
===DONE===

Diff for: tests/manager/manager-executeWriteCommand_error-002.phpt

+1-34
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,11 @@ try {
2222
$manager->executeWriteCommand(DATABASE_NAME, $command, ['writeConcern' => new MongoDB\Driver\WriteConcern("undefined")]);
2323
} catch (MongoDB\Driver\Exception\CommandException $e) {
2424
printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage());
25-
var_dump($e->getResultDocument());
2625
}
2726

2827
?>
2928
===DONE===
3029
<?php exit(0); ?>
31-
--EXPECTF--
30+
--EXPECT--
3231
MongoDB\Driver\Exception\CommandException(79): Write Concern error: No write concern mode named 'undefined' found in replica set configuration
33-
object(stdClass)#%d (%d) {
34-
["lastErrorObject"]=>
35-
object(stdClass)#%d (3) {
36-
["n"]=>
37-
int(1)
38-
["updatedExisting"]=>
39-
bool(false)
40-
["upserted"]=>
41-
string(3) "foo"
42-
}
43-
["value"]=>
44-
object(stdClass)#%d (2) {
45-
["_id"]=>
46-
string(3) "foo"
47-
["foo"]=>
48-
array(1) {
49-
[0]=>
50-
string(3) "bar"
51-
}
52-
}
53-
["writeConcernError"]=>
54-
object(stdClass)#%d (3) {
55-
["code"]=>
56-
int(79)
57-
["codeName"]=>
58-
string(23) "UnknownReplWriteConcern"
59-
["errmsg"]=>
60-
string(74) "No write concern mode named 'undefined' found in replica set configuration"
61-
}
62-
["ok"]=>
63-
float(1)%A
64-
}
6532
===DONE===

Diff for: tests/manager/manager-executeWriteCommand_error-003.phpt

+1-12
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,11 @@ try {
2121
$manager->executeWriteCommand(DATABASE_NAME, $command);
2222
} catch (MongoDB\Driver\Exception\CommandException $e) {
2323
printf("%s(%d): %s\n", get_class($e), $e->getCode(), $e->getMessage());
24-
var_dump($e->getResultDocument());
2524
}
2625

2726
?>
2827
===DONE===
2928
<?php exit(0); ?>
30-
--EXPECTF--
29+
--EXPECT--
3130
MongoDB\Driver\Exception\CommandException(9): Either an update or remove=true must be specified
32-
object(stdClass)#%d (%d) {
33-
["ok"]=>
34-
float(0)
35-
["errmsg"]=>
36-
string(49) "Either an update or remove=true must be specified"
37-
["code"]=>
38-
int(9)
39-
["codeName"]=>
40-
string(13) "FailedToParse"%A
41-
}
4231
===DONE===

0 commit comments

Comments
 (0)