Skip to content

Commit

Permalink
Update tests after the MongoDB ODM added typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Jan 9, 2024
1 parent ad88459 commit 14b12e7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Doctrine\ODM\MongoDB\Aggregation\Aggregation;
use Doctrine\ODM\MongoDB\Aggregation\Builder;
use Doctrine\ODM\MongoDB\Aggregation\Stage\Count;
use Doctrine\ODM\MongoDB\Aggregation\Stage\Limit;
use Doctrine\ODM\MongoDB\Aggregation\Stage\Skip;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ODM\MongoDB\Iterator\Iterator;
Expand Down Expand Up @@ -88,12 +89,15 @@ public function testGetSlice(): void
/** @var MockObject&Skip $skipStage */
$skipStage = $this->createMock(Skip::class);

/** @var MockObject&Limit $limitStage */
$limitStage = $this->createMock(Limit::class);

$skipStage->expects(self::once())
->method('limit')
->with($length)
->willReturn($this->aggregationBuilder);
->willReturn($limitStage);

$this->aggregationBuilder->expects(self::once())
$limitStage->expects(self::once())
->method('getAggregation')
->willReturn($aggregation);

Expand Down

0 comments on commit 14b12e7

Please sign in to comment.