File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ function (array $event) use ($expectedFilter): void {
52
52
* @dataProvider provideReplacementDocuments
53
53
* @dataProvider provideUpdateDocuments
54
54
* @dataProvider provideUpdatePipelines
55
+ * @dataProvider provideReplacementDocumentLikePipeline
55
56
*/
56
57
public function testUpdateDocuments ($ update , $ expectedUpdate ): void
57
58
{
@@ -76,6 +77,18 @@ function (array $event) use ($expectedUpdate): void {
76
77
);
77
78
}
78
79
80
+ public function provideReplacementDocumentLikePipeline (): array
81
+ {
82
+ /* libmongoc encodes this replacement document as a BSON array because
83
+ * it resembles an update pipeline (see: CDRIVER-4658). */
84
+ return [
85
+ 'replacement_like_pipeline ' => [
86
+ (object ) ['0 ' => ['$set ' => ['x ' => 1 ]]],
87
+ [(object ) ['$set ' => (object ) ['x ' => 1 ]]],
88
+ ],
89
+ ];
90
+ }
91
+
79
92
public function testSessionOption (): void
80
93
{
81
94
(new CommandObserver ())->observe (
You can’t perform that action at this time.
0 commit comments