|
25 | 25 | use MongoDB\Operation\InsertOne;
|
26 | 26 | use MongoDB\Operation\Watch;
|
27 | 27 | use MongoDB\Tests\CommandObserver;
|
| 28 | +use PHPUnit\Framework\Constraint\ObjectHasProperty; |
28 | 29 | use PHPUnit\Framework\ExpectationFailedException;
|
29 | 30 | use ReflectionClass;
|
30 | 31 | use stdClass;
|
@@ -1278,19 +1279,19 @@ function (array $event) use (&$aggregateCommands): void {
|
1278 | 1279 | $aggregateCommands[0]['pipeline'][0]->{'$changeStream'},
|
1279 | 1280 | $this->logicalNot(
|
1280 | 1281 | $this->logicalOr(
|
1281 |
| - $this->objectHasAttribute('resumeAfter'), |
1282 |
| - $this->objectHasAttribute('startAfter'), |
1283 |
| - $this->objectHasAttribute('startAtOperationTime'), |
| 1282 | + new ObjectHasProperty('resumeAfter'), |
| 1283 | + new ObjectHasProperty('startAfter'), |
| 1284 | + new ObjectHasProperty('startAtOperationTime'), |
1284 | 1285 | ),
|
1285 | 1286 | ),
|
1286 | 1287 | );
|
1287 | 1288 |
|
1288 | 1289 | $this->assertThat(
|
1289 | 1290 | $aggregateCommands[1]['pipeline'][0]->{'$changeStream'},
|
1290 | 1291 | $this->logicalOr(
|
1291 |
| - $this->objectHasAttribute('resumeAfter'), |
1292 |
| - $this->objectHasAttribute('startAfter'), |
1293 |
| - $this->objectHasAttribute('startAtOperationTime'), |
| 1292 | + new ObjectHasProperty('resumeAfter'), |
| 1293 | + new ObjectHasProperty('startAfter'), |
| 1294 | + new ObjectHasProperty('startAtOperationTime'), |
1294 | 1295 | ),
|
1295 | 1296 | );
|
1296 | 1297 |
|
|
0 commit comments