[export] fix calendar filters/aggregators + tests: 'at' based on calendar date

This commit is contained in:
2023-10-03 14:19:45 +02:00
parent 84ba626fb5
commit 31fc7fffe9
9 changed files with 74 additions and 105 deletions

View File

@@ -20,7 +20,6 @@ namespace Chill\CalendarBundle\Tests\Export\Aggregator;
use Chill\CalendarBundle\Entity\Calendar;
use Chill\CalendarBundle\Export\Aggregator\JobAggregator;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
use Doctrine\ORM\EntityManagerInterface;
@@ -47,9 +46,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
public function getFormData(): array
{
return [
[
'job_at' => new RollingDate(RollingDate::T_FIXED_DATE, \DateTimeImmutable::createFromFormat('Y-m-d', '2020-01-01')),
]
[]
];
}

View File

@@ -20,7 +20,6 @@ namespace Chill\CalendarBundle\Tests\Export\Aggregator;
use Chill\CalendarBundle\Entity\Calendar;
use Chill\CalendarBundle\Export\Aggregator\ScopeAggregator;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractAggregatorTest;
use Doctrine\ORM\EntityManagerInterface;
@@ -47,9 +46,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
public function getFormData(): array
{
return [
[
'scope_at' => new RollingDate(RollingDate::T_FIXED_DATE, \DateTimeImmutable::createFromFormat('Y-m-d', '2020-01-01')),
],
[],
];
}

View File

@@ -21,7 +21,6 @@ namespace Chill\CalendarBundle\Tests\Export\Filter;
use Chill\CalendarBundle\Entity\Calendar;
use Chill\CalendarBundle\Export\Filter\JobFilter;
use Chill\MainBundle\Entity\UserJob;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use Doctrine\ORM\EntityManagerInterface;
@@ -68,7 +67,6 @@ final class JobFilterTest extends AbstractFilterTest
foreach ($array as $a) {
$data[] = [
'job' => $a,
'job_at' => new RollingDate(RollingDate::T_FIXED_DATE, \DateTimeImmutable::createFromFormat('Y-m-d', '2020-01-01')),
];
}

View File

@@ -21,7 +21,6 @@ namespace Chill\CalendarBundle\Tests\Export\Filter;
use Chill\CalendarBundle\Entity\Calendar;
use Chill\CalendarBundle\Export\Filter\ScopeFilter;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use Doctrine\ORM\EntityManagerInterface;
@@ -68,7 +67,6 @@ final class ScopeFilterTest extends AbstractFilterTest
foreach ($array as $a) {
$data[] = [
'scope' => $a,
'scope_at' => new RollingDate(RollingDate::T_FIXED_DATE, \DateTimeImmutable::createFromFormat('Y-m-d', '2020-01-01')),
];
}