Skip to content

Commit e962256

Browse files
committed
Replace deprecated ObjectHasAttribute with ObjectHasProperty
1 parent 912fc74 commit e962256

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/Operation/WatchFunctionalTest.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use MongoDB\Operation\InsertOne;
2626
use MongoDB\Operation\Watch;
2727
use MongoDB\Tests\CommandObserver;
28+
use PHPUnit\Framework\Constraint\ObjectHasProperty;
2829
use PHPUnit\Framework\ExpectationFailedException;
2930
use ReflectionClass;
3031
use stdClass;
@@ -1278,19 +1279,19 @@ function (array $event) use (&$aggregateCommands): void {
12781279
$aggregateCommands[0]['pipeline'][0]->{'$changeStream'},
12791280
$this->logicalNot(
12801281
$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'),
12841285
),
12851286
),
12861287
);
12871288

12881289
$this->assertThat(
12891290
$aggregateCommands[1]['pipeline'][0]->{'$changeStream'},
12901291
$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'),
12941295
),
12951296
);
12961297

0 commit comments

Comments
 (0)