mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix tests
This commit is contained in:
parent
8c5abbff74
commit
8516c87a14
@ -119,7 +119,7 @@ final readonly class SocialActionFilter implements FilterInterface
|
||||
|
||||
public function normalizeFormData(array $formData): array
|
||||
{
|
||||
return ['accepted_socialactions' => $formData['accepted_socialactions'], 'start_date_after' => $formData['start_date_after']->normalize(), 'start_date_before' => $formData['start_date_before']->normalize(), 'end_date_after' => $formData['end_date_after']->normalize(), 'end_date_before' => $formData['end_date_before']->normalize()];
|
||||
return ['accepted_socialactions' => $formData['accepted_socialactions'], 'start_date_after' => $formData['start_date_after']?->normalize(), 'start_date_before' => $formData['start_date_before']?->normalize(), 'end_date_after' => $formData['end_date_after']?->normalize(), 'end_date_before' => $formData['end_date_before']?->normalize()];
|
||||
}
|
||||
|
||||
public function denormalizeFormData(array $formData, int $fromVersion): array
|
||||
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace src\Bundle\ChillPersonBundle\Tests\Export\Filter\AccompanyingCourseFilters;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Repository\UserRepositoryInterface;
|
||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
||||
use Chill\MainBundle\Templating\Entity\UserRender;
|
||||
@ -30,17 +31,20 @@ class ReferrerFilterBetweenDatesTest extends AbstractFilterTest
|
||||
private RollingDateConverterInterface $rollingDateConverter;
|
||||
private UserRender $userRender;
|
||||
|
||||
private UserRepositoryInterface $userRepository;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
self::bootKernel();
|
||||
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
|
||||
$this->userRender = self::getContainer()->get(UserRender::class);
|
||||
$this->userRepository = self::getContainer()->get(UserRepositoryInterface::class);
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
{
|
||||
return new ReferrerFilterBetweenDates($this->rollingDateConverter, $this->userRender);
|
||||
return new ReferrerFilterBetweenDates($this->rollingDateConverter, $this->userRender, $this->userRepository);
|
||||
}
|
||||
|
||||
public static function getFormData(): array
|
||||
|
Loading…
x
Reference in New Issue
Block a user