diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php index ce4f6452c..378f8c4d9 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php @@ -259,7 +259,6 @@ abstract class AbstractFilterTest extends KernelTestCase public function testDescriptionAction($data) { $context = new ExportGenerationContext((new User())->setLabel('test user')); - $description = $this->getFilter()->describeAction($data, $context); $this->assertTrue( diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 5a059e908..fd668a1fa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -18,6 +18,7 @@ use Chill\MainBundle\Repository\UserRepositoryInterface; use Chill\MainBundle\Form\Type\PickUserOrMeDynamicType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; +use Chill\MainBundle\Templating\Entity\UserRender; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; @@ -32,7 +33,7 @@ final readonly class ReferrerFilter implements FilterInterface private const PU = 'acp_referrer_filter_users'; - public function __construct(private RollingDateConverterInterface $rollingDateConverter, private UserRepositoryInterface $userRepository) {} + public function __construct(private RollingDateConverterInterface $rollingDateConverter, private UserRepositoryInterface $userRepository, private UserRender $userRender) {} public function addRole(): ?string { @@ -103,8 +104,8 @@ final readonly class ReferrerFilter implements FilterInterface { $users = []; - foreach ($data['accepted_referrers'] as $r) { - $users[] = $r; + foreach ($this->userOrMe($data['accepted_referrers'], $context) as $r) { + $users[] = $this->userRender->renderString($r, []); } return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php index 45bb6df46..73088a9d4 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php @@ -55,6 +55,8 @@ final class ReferrerFilterTest extends AbstractFilterTest $data[] = ['accepted_referrers' => $u, 'date_calc' => new RollingDate(RollingDate::T_TODAY)]; } + $data[] = ['accepted_referrers' => 'me', 'date_calc' => new RollingDate(RollingDate::T_TODAY)]; + return $data; }