Export: add clauses on the social work start date and end date within the filter "Filter accompanying period by accompanying period work"'

This commit is contained in:
2023-11-15 13:23:05 +01:00
parent af6bee2497
commit e9df26c2f7
6 changed files with 147 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Tests\Export\Filter\AccompanyingCourseFilters;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
@@ -50,7 +51,36 @@ final class SocialActionFilterTest extends AbstractFilterTest
->setMaxResults(1)
->getResult();
yield ['accepted_socialactions' => $array];
return [
[
'accepted_socialactions' => $array,
'start_date_after' => null,
'start_date_before' => null,
'end_date_after' => null,
'end_date_before' => null,
],
[
'accepted_socialactions' => $array,
'start_date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
'start_date_before' => new RollingDate(RollingDate::T_TODAY),
'end_date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
'end_date_before' => new RollingDate(RollingDate::T_TODAY),
],
[
'accepted_socialactions' => [],
'start_date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
'start_date_before' => new RollingDate(RollingDate::T_TODAY),
'end_date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
'end_date_before' => new RollingDate(RollingDate::T_TODAY),
],
[
'accepted_socialactions' => [],
'start_date_after' => null,
'start_date_before' => null,
'end_date_after' => null,
'end_date_before' => null,
],
];
}
public function getQueryBuilders(): array