DX: fix construct of ReferrerScopeAggregator in test

This commit is contained in:
Julien Fastré 2022-11-15 18:17:58 +01:00
parent 434ef075da
commit 0e661784b0
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -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()
);
}