mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 22:35:01 +00:00
[export] fix calendar scope/job Filters query + unit test (partial)
This commit is contained in:
@@ -21,6 +21,7 @@ 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;
|
||||
|
||||
@@ -62,7 +63,16 @@ final class JobFilterTest extends AbstractFilterTest
|
||||
->setMaxResults(1)
|
||||
->getResult();
|
||||
|
||||
yield ['job' => $array];
|
||||
$data = [];
|
||||
|
||||
foreach ($array as $a) {
|
||||
$data[] = [
|
||||
'job' => $a,
|
||||
'job_at' => new RollingDate(RollingDate::T_FIXED_DATE, \DateTimeImmutable::createFromFormat('Y-m-d', '2020-01-01')),
|
||||
];
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
|
@@ -21,6 +21,7 @@ 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;
|
||||
|
||||
@@ -67,6 +68,7 @@ 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')),
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user