Skip to content

Commit

Permalink
Merge v1.x into v2.x (#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongodb-php-bot authored Sep 16, 2024
2 parents 6fd6307 + 7093d9b commit 6a6e904
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Operation/WatchFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,15 @@ function (array $event) use (&$events): void {
$this->assertCount(3, $events);

$this->assertSame('getMore', $events[0]['started']->getCommandName());
$this->arrayHasKey('failed', $events[0]);
$this->assertArrayHasKey('failed', $events[0]);

$this->assertSame('aggregate', $events[1]['started']->getCommandName());
$this->assertResumeAfter($postBatchResumeToken, $events[1]['started']->getCommand());
$this->arrayHasKey('succeeded', $events[1]);
$this->assertArrayHasKey('succeeded', $events[1]);

// Original cursor is freed immediately after the change stream resumes
$this->assertSame('killCursors', $events[2]['started']->getCommandName());
$this->arrayHasKey('succeeded', $events[2]);
$this->assertArrayHasKey('succeeded', $events[2]);

$this->assertFalse($changeStream->valid());
}
Expand Down Expand Up @@ -380,15 +380,15 @@ function (array $event) use (&$events): void {
$this->assertCount(3, $events);

$this->assertSame('getMore', $events[0]['started']->getCommandName());
$this->arrayHasKey('failed', $events[0]);
$this->assertArrayHasKey('failed', $events[0]);

$this->assertSame('aggregate', $events[1]['started']->getCommandName());
$this->assertStartAtOperationTime($operationTime, $events[1]['started']->getCommand());
$this->arrayHasKey('succeeded', $events[1]);
$this->assertArrayHasKey('succeeded', $events[1]);

// Original cursor is freed immediately after the change stream resumes
$this->assertSame('killCursors', $events[2]['started']->getCommandName());
$this->arrayHasKey('succeeded', $events[2]);
$this->assertArrayHasKey('succeeded', $events[2]);

$this->assertFalse($changeStream->valid());
}
Expand Down

0 comments on commit 6a6e904

Please sign in to comment.