fix: correctly apply due dates for contract and invoice upload reminders
This commit is contained in:
@@ -8,7 +8,7 @@ use App\Entity\Application;
|
||||
use App\Entity\Assignment;
|
||||
use App\Entity\Teamer;
|
||||
use App\Repository\ApplicationRepository;
|
||||
use Carbon\CarbonPeriod;
|
||||
use Carbon\CarbonPeriodImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
@@ -55,7 +55,7 @@ class ApplicationRepositoryTest extends KernelTestCase
|
||||
public function testOverlappingQueryBindsThePeriodBoundaries(): void
|
||||
{
|
||||
$teamer = new Teamer();
|
||||
$period = new CarbonPeriod('2025-01-10', '2025-01-20');
|
||||
$period = new CarbonPeriodImmutable('2025-01-10', '2025-01-20');
|
||||
|
||||
$query = $this->createOverlappingQuery($teamer, $period);
|
||||
|
||||
@@ -66,7 +66,7 @@ class ApplicationRepositoryTest extends KernelTestCase
|
||||
$this->assertSame('2025-01-20', $query->getParameter('dateTo')->getValue()->format('Y-m-d'));
|
||||
}
|
||||
|
||||
private function createOverlappingQuery(?Teamer $teamer = null, ?CarbonPeriod $period = null): Query
|
||||
private function createOverlappingQuery(?Teamer $teamer = null, ?CarbonPeriodImmutable $period = null): Query
|
||||
{
|
||||
/** @var EntityManagerInterface $entityManager */
|
||||
$entityManager = static::getContainer()->get(EntityManagerInterface::class);
|
||||
@@ -76,7 +76,7 @@ class ApplicationRepositoryTest extends KernelTestCase
|
||||
|
||||
return $repository->getOverlappingForTeamerQuery(
|
||||
$teamer ?? new Teamer(),
|
||||
$period ?? new CarbonPeriod('2025-01-10', '2025-01-20')
|
||||
$period ?? new CarbonPeriodImmutable('2025-01-10', '2025-01-20')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user