feat: remove obsolete date range override
This commit is contained in:
@@ -24,25 +24,21 @@ class StatisticsEventRepositoryTest extends KernelTestCase
|
||||
{
|
||||
$dql = $this->query(dateFrom: new \DateTimeImmutable('2026-07-01'))->getDQL();
|
||||
|
||||
$this->assertStringContainsString('assignment.dateFrom >= :dateFrom', $dql);
|
||||
$this->assertStringContainsString('destination.dateFrom >= :dateFrom', $dql);
|
||||
$this->assertStringNotContainsString('event.occurredAt', $dql);
|
||||
}
|
||||
|
||||
/**
|
||||
* The season start is assignment.dateFrom falling back to the destination's, per
|
||||
* Assignment::getEffectivePeriod(). Losing the fallback would silently drop every
|
||||
* assignment that inherits its dates.
|
||||
* The season is the destination's date range, the convention shared with SeasonPeriodFilter.
|
||||
*/
|
||||
public function testTheSeasonFallsBackToTheDestinationDates(): void
|
||||
public function testTheSeasonIsTheDestinationDateRange(): void
|
||||
{
|
||||
$dql = $this->query(
|
||||
dateFrom: new \DateTimeImmutable('2026-07-01'),
|
||||
dateTo: new \DateTimeImmutable('2027-06-30'),
|
||||
)->getDQL();
|
||||
|
||||
$this->assertStringContainsString('assignment.dateFrom IS NULL', $dql);
|
||||
$this->assertStringContainsString('destination.dateFrom >= :dateFrom', $dql);
|
||||
$this->assertStringContainsString('assignment.dateTo IS NULL', $dql);
|
||||
$this->assertStringContainsString('destination.dateTo <= :dateTo', $dql);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user