Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
f24bfcd7
Commit
f24bfcd7
authored
Oct 09, 2018
by
Jeremy Mikola
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #582
parents
21d35954
2e4f0142
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1267 additions
and
42 deletions
+1267
-42
CrudSpecFunctionalTest.php
tests/Collection/CrudSpecFunctionalTest.php
+111
-40
count-empty.json
tests/Collection/spec-tests/read/count-empty.json
+39
-0
bulkWrite-collation.json
tests/Collection/spec-tests/write/bulkWrite-collation.json
+217
-0
bulkWrite.json
tests/Collection/spec-tests/write/bulkWrite.json
+790
-0
insertMany.json
tests/Collection/spec-tests/write/insertMany.json
+108
-1
updateMany-arrayFilters.json
.../Collection/spec-tests/write/updateMany-arrayFilters.json
+2
-1
No files found.
tests/Collection/CrudSpecFunctionalTest.php
View file @
f24bfcd7
This diff is collapsed.
Click to expand it.
tests/Collection/spec-tests/read/count-empty.json
0 → 100644
View file @
f24bfcd7
{
"data"
:
[],
"tests"
:
[
{
"description"
:
"Estimated document count with empty collection"
,
"operation"
:
{
"name"
:
"estimatedDocumentCount"
,
"arguments"
:
{}
},
"outcome"
:
{
"result"
:
0
}
},
{
"description"
:
"Count documents with empty collection"
,
"operation"
:
{
"name"
:
"countDocuments"
,
"arguments"
:
{
"filter"
:
{}
}
},
"outcome"
:
{
"result"
:
0
}
},
{
"description"
:
"Deprecated count with empty collection"
,
"operation"
:
{
"name"
:
"count"
,
"arguments"
:
{
"filter"
:
{}
}
},
"outcome"
:
{
"result"
:
0
}
}
]
}
tests/Collection/spec-tests/write/bulkWrite-collation.json
0 → 100644
View file @
f24bfcd7
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
"ping"
},
{
"_id"
:
3
,
"x"
:
"pINg"
},
{
"_id"
:
4
,
"x"
:
"pong"
},
{
"_id"
:
5
,
"x"
:
"pONg"
}
],
"minServerVersion"
:
"3.4"
,
"tests"
:
[
{
"description"
:
"BulkWrite with delete operations and collation"
,
"operation"
:
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"PING"
},
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
2
}
}
},
{
"name"
:
"deleteOne"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"PING"
},
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
2
}
}
},
{
"name"
:
"deleteMany"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"PONG"
},
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
2
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
},
"outcome"
:
{
"result"
:
{
"deletedCount"
:
4
,
"insertedCount"
:
0
,
"insertedIds"
:
{},
"matchedCount"
:
0
,
"modifiedCount"
:
0
,
"upsertedCount"
:
0
,
"upsertedIds"
:
{}
},
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
}
]
}
}
},
{
"description"
:
"BulkWrite with update operations and collation"
,
"operation"
:
{
"name"
:
"bulkWrite"
,
"arguments"
:
{
"requests"
:
[
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"ping"
},
"update"
:
{
"$set"
:
{
"x"
:
"PONG"
}
},
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
3
}
}
},
{
"name"
:
"updateOne"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"ping"
},
"update"
:
{
"$set"
:
{
"x"
:
"PONG"
}
},
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
2
}
}
},
{
"name"
:
"replaceOne"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"ping"
},
"replacement"
:
{
"_id"
:
6
,
"x"
:
"ping"
},
"upsert"
:
true
,
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
3
}
}
},
{
"name"
:
"updateMany"
,
"arguments"
:
{
"filter"
:
{
"x"
:
"pong"
},
"update"
:
{
"$set"
:
{
"x"
:
"PONG"
}
},
"collation"
:
{
"locale"
:
"en_US"
,
"strength"
:
2
}
}
}
],
"options"
:
{
"ordered"
:
true
}
}
},
"outcome"
:
{
"result"
:
{
"deletedCount"
:
0
,
"insertedCount"
:
0
,
"insertedIds"
:
{},
"matchedCount"
:
6
,
"modifiedCount"
:
4
,
"upsertedCount"
:
1
,
"upsertedIds"
:
{
"2"
:
6
}
},
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
"PONG"
},
{
"_id"
:
3
,
"x"
:
"PONG"
},
{
"_id"
:
4
,
"x"
:
"PONG"
},
{
"_id"
:
5
,
"x"
:
"PONG"
},
{
"_id"
:
6
,
"x"
:
"ping"
}
]
}
}
}
]
}
tests/Collection/spec-tests/write/bulkWrite.json
0 → 100644
View file @
f24bfcd7
This diff is collapsed.
Click to expand it.
tests/Collection/spec-tests/write/insertMany.json
View file @
f24bfcd7
...
@@ -20,7 +20,10 @@
...
@@ -20,7 +20,10 @@
"_id"
:
3
,
"_id"
:
3
,
"x"
:
33
"x"
:
33
}
}
]
],
"options"
:
{
"ordered"
:
true
}
}
}
},
},
"outcome"
:
{
"outcome"
:
{
...
@@ -47,6 +50,110 @@
...
@@ -47,6 +50,110 @@
]
]
}
}
}
}
},
{
"description"
:
"InsertMany continue-on-error behavior with unordered (preexisting duplicate key)"
,
"operation"
:
{
"name"
:
"insertMany"
,
"arguments"
:
{
"documents"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"options"
:
{
"ordered"
:
false
}
}
},
"outcome"
:
{
"error"
:
true
,
"result"
:
{
"deletedCount"
:
0
,
"insertedCount"
:
2
,
"matchedCount"
:
0
,
"modifiedCount"
:
0
,
"upsertedCount"
:
0
,
"upsertedIds"
:
{}
},
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
},
{
"description"
:
"InsertMany continue-on-error behavior with unordered (duplicate key in requests)"
,
"operation"
:
{
"name"
:
"insertMany"
,
"arguments"
:
{
"documents"
:
[
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
],
"options"
:
{
"ordered"
:
false
}
}
},
"outcome"
:
{
"error"
:
true
,
"result"
:
{
"deletedCount"
:
0
,
"insertedCount"
:
2
,
"matchedCount"
:
0
,
"modifiedCount"
:
0
,
"upsertedCount"
:
0
,
"upsertedIds"
:
{}
},
"collection"
:
{
"data"
:
[
{
"_id"
:
1
,
"x"
:
11
},
{
"_id"
:
2
,
"x"
:
22
},
{
"_id"
:
3
,
"x"
:
33
}
]
}
}
}
}
]
]
}
}
tests/Collection/spec-tests/write/updateMany-arrayFilters.json
View file @
f24bfcd7
...
@@ -98,7 +98,8 @@
...
@@ -98,7 +98,8 @@
"outcome"
:
{
"outcome"
:
{
"result"
:
{
"result"
:
{
"matchedCount"
:
2
,
"matchedCount"
:
2
,
"modifiedCount"
:
1
"modifiedCount"
:
1
,
"upsertedCount"
:
0
},
},
"collection"
:
{
"collection"
:
{
"data"
:
[
"data"
:
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment