Commit fc8988a9 authored by Jeremy Mikola's avatar Jeremy Mikola

Merge pull request #568

parents bd148eab 38b0f693
......@@ -240,6 +240,10 @@ class CrudSpecFunctionalTest extends FunctionalTestCase
$this->assertSame($expectedResult['deletedCount'], $actualResult->getDeletedCount());
}
if (isset($expectedResult['insertedCount'])) {
$this->assertSame($expectedResult['insertedCount'], $actualResult->getInsertedCount());
}
if (isset($expectedResult['insertedIds'])) {
$this->assertSameDocument(
['insertedIds' => $expectedResult['insertedIds']],
......
......@@ -28,48 +28,57 @@
{
"description": "BulkWrite with arrayFilters",
"operation": {
"name": "bulkWrite",
"arguments": {
"options": {
"ordered": true
},
"requests": [
{
"name": "updateOne",
"arguments": {
"arrayFilters": [
{
"i.b": 3
}
],
"filter": {},
"update": {
"$set": {
"y.$[i].b": 2
}
}
},
"name": "updateOne"
},
{
"arguments": {
"arrayFilters": [
{
"i.b": 1
"i.b": 3
}
],
]
}
},
{
"name": "updateMany",
"arguments": {
"filter": {},
"update": {
"$set": {
"y.$[i].b": 2
}
}
},
"name": "updateMany"
"arrayFilters": [
{
"i.b": 1
}
]
},
"name": "bulkWrite"
}
}
],
"options": {
"ordered": true
}
}
},
"outcome": {
"result": {
"deletedCount": 0,
"insertedCount": 0,
"insertedIds": {},
"matchedCount": 3,
"modifiedCount": 3,
"upsertedCount": 0,
"upsertedIds": {}
},
"collection": {
"data": [
{
......@@ -95,14 +104,6 @@
]
}
]
},
"result": {
"deletedCount": 0,
"insertedIds": {},
"matchedCount": 3,
"modifiedCount": 3,
"upsertedCount": 0,
"upsertedIds": {}
}
}
}
......
......@@ -25,10 +25,10 @@
},
"outcome": {
"result": {
"insertedIds": [
2,
3
]
"insertedIds": {
"0": 2,
"1": 3
}
},
"collection": {
"data": [
......
......@@ -46,7 +46,8 @@
"outcome": {
"result": {
"matchedCount": 2,
"modifiedCount": 0
"modifiedCount": 0,
"upsertedCount": 0
},
"collection": {
"data": [
......@@ -148,7 +149,8 @@
"outcome": {
"result": {
"matchedCount": 2,
"modifiedCount": 2
"modifiedCount": 2,
"upsertedCount": 0
},
"collection": {
"data": [
......
......@@ -62,7 +62,8 @@
"outcome": {
"result": {
"matchedCount": 1,
"modifiedCount": 0
"modifiedCount": 0,
"upsertedCount": 0
},
"collection": {
"data": [
......@@ -129,7 +130,8 @@
"outcome": {
"result": {
"matchedCount": 1,
"modifiedCount": 1
"modifiedCount": 1,
"upsertedCount": 0
},
"collection": {
"data": [
......@@ -196,7 +198,8 @@
"outcome": {
"result": {
"matchedCount": 1,
"modifiedCount": 1
"modifiedCount": 1,
"upsertedCount": 0
},
"collection": {
"data": [
......@@ -268,7 +271,8 @@
"outcome": {
"result": {
"matchedCount": 1,
"modifiedCount": 0
"modifiedCount": 0,
"upsertedCount": 0
},
"collection": {
"data": [
......@@ -340,7 +344,8 @@
"outcome": {
"result": {
"matchedCount": 1,
"modifiedCount": 1
"modifiedCount": 1,
"upsertedCount": 0
},
"collection": {
"data": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment