feat: remove obsolete date range override

This commit is contained in:
2026-08-31 16:56:36 +02:00
parent 86c5d23181
commit 127ced4378
42 changed files with 152 additions and 353 deletions
+4 -12
View File
@@ -20,21 +20,13 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
*/
class ApplicationRepositoryTest extends KernelTestCase
{
public function testOverlappingQueryUsesInclusiveBoundariesAndEffectiveDates(): void
public function testOverlappingQueryUsesInclusiveBoundariesOnTheDestinationDates(): void
{
$dql = $this->createOverlappingQuery()->getDQL();
// an assignment overrides the date range of its destination, so both have to be considered
$this->assertStringContainsString(
'(assignment.dateFrom IS NULL AND destination.dateFrom <= :dateTo)'
.' OR (assignment.dateFrom IS NOT NULL AND assignment.dateFrom <= :dateTo)',
$dql
);
$this->assertStringContainsString(
'(assignment.dateTo IS NULL AND destination.dateTo >= :dateFrom)'
.' OR (assignment.dateTo IS NOT NULL AND assignment.dateTo >= :dateFrom)',
$dql
);
// the assignment period is the date range of its destination
$this->assertStringContainsString('destination.dateFrom <= :dateTo', $dql);
$this->assertStringContainsString('destination.dateTo >= :dateFrom', $dql);
// strict comparisons would let assignments that touch on a boundary pass and could never
// match a single day assignment at all