Skip to content

Commit

Permalink
Merge branch '3.x' into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Jan 9, 2024
2 parents b4b8f92 + 14b12e7 commit 371ee10
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 @@ -85,12 +86,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 371ee10

Please sign in to comment.