fix tests implementing AbstractFilterTest

This commit is contained in:
2023-09-01 13:51:02 +02:00
parent f8f04c69d0
commit a197a6b418
56 changed files with 447 additions and 373 deletions

View File

@@ -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);

View File

@@ -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%"