mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix initial query for calendar export query
This commit is contained in:
parent
3f2339bc60
commit
2dfc228917
@ -22,8 +22,10 @@ use function in_array;
|
||||
|
||||
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
|
||||
|
@ -62,7 +62,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(cal.id)')
|
||||
->from(Calendar::class, 'cal')
|
||||
->join('cal.user', 'caluser'),
|
||||
->join('cal.mainUser', 'caluser'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
$em->createQueryBuilder()
|
||||
->select('count(cal.id)')
|
||||
->from(Calendar::class, 'cal')
|
||||
->join('cal.user', 'caluser'),
|
||||
->join('cal.mainUser', 'caluser'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ namespace Chill\CalendarBundle\Tests\Export\Filter;
|
||||
|
||||
use Chill\CalendarBundle\Entity\Calendar;
|
||||
use Chill\CalendarBundle\Export\Filter\BetweenDatesFilter;
|
||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
@ -54,8 +55,8 @@ final class BetweenDatesFilterTest extends AbstractFilterTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_from' => DateTime::createFromFormat('Y-m-d', '2022-05-01'),
|
||||
'date_to' => DateTime::createFromFormat('Y-m-d', '2022-06-01'),
|
||||
'date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
|
||||
'date_to' => new RollingDate(RollingDate::T_TODAY),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user