From 0e661784b00ee027ed58f3944f665df194a3b3ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 15 Nov 2022 18:17:58 +0100 Subject: [PATCH] DX: fix construct of ReferrerScopeAggregator in test --- .../ReferrerScopeAggregatorTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php index 07ddf1376..09d5f99df 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php @@ -13,6 +13,8 @@ namespace Export\Aggregator\AccompanyingCourseAggregators; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Repository\ScopeRepositoryInterface; +use Chill\MainBundle\Service\RollingDate\RollingDate; +use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; use Chill\PersonBundle\Entity\AccompanyingPeriod; @@ -40,9 +42,13 @@ final class ReferrerScopeAggregatorTest extends AbstractAggregatorTest (new Scope())->setName(['fr' => 'scope']) ); + $dateConverter = $this->prophesize(RollingDateConverterInterface::class); + $dateConverter->convert(Argument::type(RollingDate::class))->willReturn(new DateTimeImmutable()); + return new ReferrerScopeAggregator( $scopeRepository->reveal(), - $translatableStringHelper->reveal() + $translatableStringHelper->reveal(), + $dateConverter->reveal() ); }