mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
fix tests implementing AbstractFilterTest
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\ReportBundle\Tests\Export\Filter;
|
||||
|
||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||
use Chill\MainBundle\Test\Export\AbstractFilterTest;
|
||||
use Chill\ReportBundle\Entity\Report;
|
||||
use Chill\ReportBundle\Export\Filter\ReportDateFilter;
|
||||
@@ -29,7 +30,7 @@ final class ReportDateFilterTest extends AbstractFilterTest
|
||||
{
|
||||
self::bootKernel();
|
||||
|
||||
$this->filter = self::$container->get('chill.report.export.filter_date');
|
||||
$this->filter = self::$container->get(ReportDateFilter::class);
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
@@ -41,17 +42,15 @@ final class ReportDateFilterTest extends AbstractFilterTest
|
||||
{
|
||||
return [
|
||||
[
|
||||
'date_from' => DateTime::createFromFormat('Y-m-d', '2021-07-01'),
|
||||
'date_to' => DateTime::createFromFormat('Y-m-d', '2022-07-01'),
|
||||
'date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START),
|
||||
'date_to' => new RollingDate(RollingDate::T_TODAY),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getQueryBuilders(): array
|
||||
{
|
||||
if (null === self::$kernel) {
|
||||
self::bootKernel();
|
||||
}
|
||||
self::bootKernel();
|
||||
|
||||
$em = self::$container->get(EntityManagerInterface::class);
|
||||
|
||||
|
@@ -53,3 +53,4 @@ CHILL_REPORT_LISTS: Liste des rapports
|
||||
Filter by report's date: Filtrer par date de rapport
|
||||
Report is after this date: Rapports après cette date
|
||||
Report is before this date: Rapports avant cette date
|
||||
"Filtered by report's date: between %date_from% and %date_to%": "Filtré par date du rapport: entre le %date_from% et le %date_to%"
|
||||
|
Reference in New Issue
Block a user