Skip to content

Commit

Permalink
Use dedicated test file
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Jul 21, 2023
1 parent e35dd05 commit 0b29bcf
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/UnifiedSpecTests/UnifiedTestRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class UnifiedTestRunnerTest extends FunctionalTestCase
{
public function testEntityMapObserver(): void
{
$test = UnifiedTestCase::fromFile(__DIR__ . '/crud/find.json');
$test = UnifiedTestCase::fromFile(__DIR__ . '/runner/entity-map-observer.json');
$calls = 0;

$runner = new UnifiedTestRunner(static::getUri());
Expand Down
68 changes: 68 additions & 0 deletions tests/UnifiedSpecTests/runner/entity-map-observer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"description": "find",
"schemaVersion": "1.0",
"createEntities": [
{
"client": {
"id": "client0",
"useMultipleMongoses": true,
"observeEvents": [
"commandStartedEvent"
]
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "runner-tests"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "coll0"
}
}
],
"initialData": [
{
"collectionName": "coll0",
"databaseName": "runner-tests",
"documents": []
}
],
"tests": [
{
"description": "basic find",
"operations": [
{
"name": "find",
"arguments": {
"filter": {}
},
"object": "collection0",
"expectResult": []
}
],
"expectEvents": [
{
"client": "client0",
"events": [
{
"commandStartedEvent": {
"command": {
"find": "coll0",
"filter": {}
},
"commandName": "find",
"databaseName": "runner-tests"
}
}
]
}
]
}
]
}

0 comments on commit 0b29bcf

Please sign in to comment.