Fix initial query for calendar export query

This commit is contained in:
Julien Fastré 2023-08-28 16:06:30 +02:00
parent 3f2339bc60
commit 2dfc228917
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
4 changed files with 9 additions and 6 deletions

View File

@ -22,8 +22,10 @@ use function in_array;
final readonly class ScopeAggregator implements AggregatorInterface final readonly class ScopeAggregator implements AggregatorInterface
{ {
public function __construct(private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper) public function __construct(
{ private ScopeRepository $scopeRepository,
private TranslatableStringHelper $translatableStringHelper
) {
} }
public function addRole(): ?string public function addRole(): ?string

View File

@ -62,7 +62,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
$em->createQueryBuilder() $em->createQueryBuilder()
->select('count(cal.id)') ->select('count(cal.id)')
->from(Calendar::class, 'cal') ->from(Calendar::class, 'cal')
->join('cal.user', 'caluser'), ->join('cal.mainUser', 'caluser'),
]; ];
} }
} }

View File

@ -62,7 +62,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
$em->createQueryBuilder() $em->createQueryBuilder()
->select('count(cal.id)') ->select('count(cal.id)')
->from(Calendar::class, 'cal') ->from(Calendar::class, 'cal')
->join('cal.user', 'caluser'), ->join('cal.mainUser', 'caluser'),
]; ];
} }
} }

View File

@ -20,6 +20,7 @@ namespace Chill\CalendarBundle\Tests\Export\Filter;
use Chill\CalendarBundle\Entity\Calendar; use Chill\CalendarBundle\Entity\Calendar;
use Chill\CalendarBundle\Export\Filter\BetweenDatesFilter; use Chill\CalendarBundle\Export\Filter\BetweenDatesFilter;
use Chill\MainBundle\Service\RollingDate\RollingDate;
use Chill\MainBundle\Test\Export\AbstractFilterTest; use Chill\MainBundle\Test\Export\AbstractFilterTest;
use DateTime; use DateTime;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@ -54,8 +55,8 @@ final class BetweenDatesFilterTest extends AbstractFilterTest
{ {
return [ return [
[ [
'date_from' => DateTime::createFromFormat('Y-m-d', '2022-05-01'), 'date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
'date_to' => DateTime::createFromFormat('Y-m-d', '2022-06-01'), 'date_to' => new RollingDate(RollingDate::T_TODAY),
], ],
]; ];
} }