From b9ae8787918b7d01fb822d135a26257ddb86dd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 16 Feb 2024 21:33:57 +0100 Subject: [PATCH] Aggregators: Update test methods to static and return array Modified aggregator test methods throughout the Chill project to be now static methods. Also updated yield construction to array returns for more standardised code. --- rector.php | 6 ++++-- .../ByActivityTypeAggregatorTest.php | 5 ++--- .../BySocialActionAggregatorTest.php | 5 ++--- .../ACPAggregators/BySocialIssueAggregatorTest.php | 5 ++--- .../Aggregator/ActivityPresenceAggregatorTest.php | 5 ++--- .../Aggregator/ActivityReasonAggregatorTest.php | 5 ++--- .../Aggregator/ActivityTypeAggregatorTest.php | 5 ++--- .../Aggregator/ActivityUserAggregatorTest.php | 5 ++--- .../Aggregator/ByThirdpartyAggregatorTest.php | 5 ++--- .../Export/Aggregator/ByUserAggregatorTest.php | 5 ++--- .../Export/Aggregator/CreatorJobAggregatorTest.php | 5 ++--- .../Aggregator/CreatorScopeAggregatorTest.php | 5 ++--- .../Tests/Export/Aggregator/DateAggregatorTest.php | 5 ++--- .../Aggregator/LocationTypeAggregatorTest.php | 5 ++--- .../PersonAggregators/PersonAggregatorTest.php | 5 ++--- .../Export/Aggregator/PersonsAggregatorTest.php | 5 ++--- .../Export/Aggregator/AgentAggregatorTest.php | 5 ++--- .../Aggregator/CancelReasonAggregatorTest.php | 5 ++--- .../Tests/Export/Aggregator/JobAggregatorTest.php | 5 ++--- .../Export/Aggregator/LocationAggregatorTest.php | 5 ++--- .../Aggregator/LocationTypeAggregatorTest.php | 5 ++--- .../Export/Aggregator/MonthYearAggregatorTest.php | 5 ++--- .../Export/Aggregator/ScopeAggregatorTest.php | 5 ++--- .../Tests/Export/Filter/AgentFilterTest.php | 4 +++- .../AdministrativeLocationAggregatorTest.php | 5 ++--- .../ClosingDateAggregatorTest.php | 14 +++++++------- .../ClosingMotiveAggregatorTest.php | 5 ++--- .../ConfidentialAggregatorTest.php | 5 ++--- .../DurationAggregatorTest.php | 5 ++--- .../EmergencyAggregatorTest.php | 5 ++--- .../EvaluationAggregatorTest.php | 5 ++--- .../GeographicalUnitStatAggregatorTest.php | 5 ++--- .../IntensityAggregatorTest.php | 5 ++--- .../OpeningDateAggregatorTest.php | 12 +++++------- .../OriginAggregatorTest.php | 5 ++--- .../PersonParticipatingAggregatorTest.php | 5 ++--- .../ReferrerAggregatorTest.php | 5 ++--- .../ReferrerScopeAggregatorTest.php | 5 ++--- .../RequestorAggregatorTest.php | 5 ++--- .../ScopeAggregatorTest.php | 5 ++--- .../SocialActionAggregatorTest.php | 5 ++--- .../SocialIssueAggregatorTest.php | 5 ++--- .../StepAggregatorTest.php | 5 ++--- .../UserJobAggregatorTest.php | 5 ++--- .../ByClosingMotiveAggregatorTest.php | 5 ++--- .../ByDateAggregatorTest.php | 5 ++--- .../ByStepAggregatorTest.php | 5 ++--- .../EvaluationTypeAggregatorTest.php | 5 ++--- .../ChildrenNumberAggregatorTest.php | 5 ++--- .../CompositionAggregatorTest.php | 5 ++--- .../PersonAggregators/AgeAggregatorTest.php | 5 ++--- .../CountryOfBirthAggregatorTest.php | 5 ++--- .../PersonAggregators/GenderAggregatorTest.php | 5 ++--- .../HouseholdPositionAggregatorTest.php | 5 ++--- .../MaritalStatusAggregatorTest.php | 5 ++--- .../NationalityAggregatorTest.php | 5 ++--- .../PersonAggregators/PostalCodeAggregatorTest.php | 5 ++--- .../ActionTypeAggregatorTest.php | 5 ++--- .../CreatorAggregatorTest.php | 5 ++--- .../CreatorJobAggregatorTest.php | 5 ++--- .../CreatorScopeAggregatorTest.php | 5 ++--- .../SocialWorkAggregators/GoalAggregatorTest.php | 5 ++--- .../GoalResultAggregatorTest.php | 5 ++--- .../HandlingThirdPartyAggregatorTest.php | 5 ++--- .../SocialWorkAggregators/JobAggregatorTest.php | 5 ++--- .../ReferrerAggregatorTest.php | 5 ++--- .../SocialWorkAggregators/ResultAggregatorTest.php | 5 ++--- .../SocialWorkAggregators/ScopeAggregatorTest.php | 5 ++--- .../SocialIssueFilterTest.php | 7 +++++-- .../AccompanyingCourseFilters/StepFilterTest.php | 6 +++++- .../UserJobFilterTest.php | 7 +++++-- 71 files changed, 162 insertions(+), 214 deletions(-) diff --git a/rector.php b/rector.php index 4133bb7c4..a358e8661 100644 --- a/rector.php +++ b/rector.php @@ -51,8 +51,10 @@ return static function (RectorConfig $rectorConfig): void { // $rectorConfig->rule(\Rector\Symfony\Configs\Rector\ClassMethod\AddRouteAnnotationRector::class); // chill rules - //$rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class); - $rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractFilterTestRector::class); + $rectorConfig->rules([ + \Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractFilterTestRector::class, + \Chill\Utils\Rector\Rector\ChillBundleMakeDataProviderStaticForAbstractAggregatorTestRector::class, + ]); // skip some path... $rectorConfig->skip([ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php index 83718733e..bc0651b1f 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php @@ -50,7 +50,7 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest ); } - public function getFormData() + public static function getFormData(): array { return [ [ @@ -72,10 +72,9 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php index 7a986f6ea..1d7578bf0 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php @@ -37,17 +37,16 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php index 3a42efe0e..a3b69eaef 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php @@ -37,17 +37,16 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php index 719bbe37e..db26d4dd4 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php @@ -40,17 +40,16 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest return new ActivityPresenceAggregator($this->activityPresenceRepository, $this->translatableStringHelper); } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php index f7b9fe9a8..41c7213c0 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php @@ -49,7 +49,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ ['level' => 'reasons'], @@ -57,10 +57,9 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php index 16c26d194..0768060f2 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php @@ -50,17 +50,16 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php index 8708f8151..186dc093b 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php @@ -50,17 +50,16 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php index 20f311d9b..50d0f760e 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php @@ -37,17 +37,16 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php index 6ef724077..b45d78be1 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php @@ -37,17 +37,16 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php index 8084a5a45..763ab1a52 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php @@ -37,17 +37,16 @@ final class CreatorJobAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php index 5c053e2ec..1c0b9fe28 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php @@ -37,17 +37,16 @@ final class CreatorScopeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php index 952725a30..7fb3b42c4 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php @@ -37,7 +37,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [ @@ -52,10 +52,9 @@ final class DateAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php index d49412fe5..4eebe9dc2 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php @@ -37,17 +37,16 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php index 026dc6cf4..208d7971b 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php @@ -37,15 +37,14 @@ class PersonAggregatorTest extends AbstractAggregatorTest return new PersonAggregator($this->labelPersonHelper); } - public function getFormData() + public static function getFormData(): array { return [[]]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php index 4bdfbb262..bf9a683c3 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php @@ -38,17 +38,16 @@ class PersonsAggregatorTest extends AbstractAggregatorTest return new PersonsAggregator($this->labelPersonHelper); } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php index 6ceab2d67..0a69efa83 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php @@ -44,17 +44,16 @@ final class AgentAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php index 25a6f9c9b..8257425ce 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php @@ -44,17 +44,16 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php index 4f4eda4a6..064939cf0 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php @@ -44,17 +44,16 @@ final class JobAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php index 92c31b88d..7fa4045fd 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php @@ -44,17 +44,16 @@ final class LocationAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php index 9eb2e7d8c..341b1df9d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php @@ -44,17 +44,16 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php index 533e4c19a..6a3cd36b3 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php @@ -44,17 +44,16 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php index c6109a7e9..05d68356d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php @@ -44,17 +44,16 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php index d0d07acfd..755526b6d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php @@ -62,11 +62,13 @@ final class AgentFilterTest extends AbstractFilterTest ->getResult(); $data = []; foreach ($array as $a) { - yield [ + $data[] = [ 'accepted_agents' => $a, ]; } self::ensureKernelShutdown(); + + return $data; } public static function getQueryBuilders(): iterable diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php index 2213738e8..94284efb6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php @@ -37,17 +37,16 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php index 5338219c8..ed459fbfd 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php @@ -41,24 +41,24 @@ class ClosingDateAggregatorTest extends AbstractAggregatorTest return self::$closingDateAggregator; } - public function getFormData() + public static function getFormData(): array { - yield ['frequency' => 'YYYY']; - yield ['frequency' => 'YYYY-MM']; - yield ['frequency' => 'YYYY-IV']; + return [ + ['frequency' => 'YYYY'], + ['frequency' => 'YYYY-MM'], + ['frequency' => 'YYYY-IV'], + ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); self::$entityManager = self::getContainer()->get(EntityManagerInterface::class); - $data = [ self::$entityManager->createQueryBuilder() ->select('count(acp.id)') ->from(AccompanyingPeriod::class, 'acp'), ]; - self::ensureKernelShutdown(); return $data; diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php index 00560a7a9..4b4978d3c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php @@ -37,17 +37,16 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php index af759f91c..752b6ba0b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php @@ -37,17 +37,16 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php index 8a25c131f..8cb9031c6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php @@ -37,7 +37,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ ['precision' => 'day'], @@ -46,10 +46,9 @@ final class DurationAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php index 04815b5ea..e63564664 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php @@ -37,17 +37,16 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php index 3ba43fe99..1a322a998 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php @@ -37,17 +37,16 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php index 5c41abf8d..85a61ac14 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php @@ -39,7 +39,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { self::bootKernel(); $repository = self::getContainer()->get(GeographicalUnitLayerLayerRepository::class); @@ -50,12 +50,11 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { if (null === self::$kernel) { self::bootKernel(); } - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php index 013b5fe0e..483f9a330 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php @@ -37,17 +37,16 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php index 00bb16675..48e937106 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php @@ -41,24 +41,22 @@ class OpeningDateAggregatorTest extends AbstractAggregatorTest return self::$openingDateAggregator; } - public function getFormData() + public static function getFormData(): array { - yield ['frequency' => 'YYYY']; - yield ['frequency' => 'YYYY-MM']; - yield ['frequency' => 'YYYY-IV']; + return [['frequency' => 'YYYY'], + ['frequency' => 'YYYY-MM'], + ['frequency' => 'YYYY-IV']]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); self::$entityManager = self::getContainer()->get(EntityManagerInterface::class); - $data = [ self::$entityManager->createQueryBuilder() ->select('count(acp.id)') ->from(AccompanyingPeriod::class, 'acp'), ]; - self::ensureKernelShutdown(); return $data; diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php index 38ae61a85..ab8e4b4bb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php @@ -37,17 +37,16 @@ final class OriginAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php index 6b83fa952..813575749 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php @@ -37,15 +37,14 @@ final class PersonParticipatingAggregatorTest extends AbstractAggregatorTest return new PersonParticipatingAggregator($this->labelPersonHelper); } - public function getFormData() + public static function getFormData(): array { return [[]]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php index 1b35cc38f..fc7fe0244 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php @@ -38,17 +38,16 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ ['date_calc' => new RollingDate(RollingDate::T_TODAY)], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php index 85d75aa63..489d042a3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php @@ -52,7 +52,7 @@ final class ReferrerScopeAggregatorTest extends AbstractAggregatorTest ); } - public function getFormData() + public static function getFormData(): array { return [ [ @@ -61,10 +61,9 @@ final class ReferrerScopeAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php index 576050a9a..785809c38 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php @@ -37,17 +37,16 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php index 064d046e4..939966c78 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php @@ -37,17 +37,16 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php index ca2db8d89..f76452fd8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php @@ -37,17 +37,16 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php index 86dc9bf48..bad9cec20 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php @@ -37,17 +37,16 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php index 11c0acc3b..f4a34e271 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php @@ -38,7 +38,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [ @@ -47,10 +47,9 @@ final class StepAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php index ab459297a..645470e83 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php @@ -38,7 +38,7 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [ @@ -47,10 +47,9 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php index 475a67470..c816799b8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php @@ -44,18 +44,17 @@ class ByClosingMotiveAggregatorTest extends AbstractAggregatorTest ); } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); $em = self::getContainer()->get(EntityManagerInterface::class); - $qb = $em->createQueryBuilder() ->select('COUNT(DISTINCT acpstephistory.id) As export_result') ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php index 687a07e97..1fee0d997 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php @@ -29,7 +29,7 @@ class ByDateAggregatorTest extends AbstractAggregatorTest return new ByDateAggregator(); } - public function getFormData() + public static function getFormData(): array { return [ [ @@ -44,11 +44,10 @@ class ByDateAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); $em = self::getContainer()->get(EntityManagerInterface::class); - $qb = $em->createQueryBuilder() ->select('COUNT(DISTINCT acpstephistory.id) As export_result') ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php index 4e15b5286..58e3e5f61 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php @@ -36,16 +36,15 @@ class ByStepAggregatorTest extends AbstractAggregatorTest return new ByStepAggregator($translator); } - public function getFormData() + public static function getFormData(): array { return [[]]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); $em = self::getContainer()->get(EntityManagerInterface::class); - $qb = $em->createQueryBuilder() ->select('COUNT(DISTINCT acpstephistory.id) As export_result') ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php index 15c458409..b275be336 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php @@ -37,17 +37,16 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php index 88b1510c9..50b3f5b1f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php @@ -38,7 +38,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [ @@ -47,10 +47,9 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php index afc9c564d..2bfbb83a6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php @@ -38,7 +38,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [ @@ -47,10 +47,9 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php index 12a1e3e99..39240dc83 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php @@ -38,7 +38,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ [ @@ -47,10 +47,9 @@ final class AgeAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php index 949e821e9..499484587 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php @@ -37,7 +37,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ ['group_by_level' => 'continent'], @@ -45,10 +45,9 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php index ed67fd2df..7b6978279 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php @@ -37,17 +37,16 @@ final class GenderAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php index 91d196594..951932126 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php @@ -40,7 +40,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [ @@ -49,10 +49,9 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php index 7f407ae9e..6c19379d2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php @@ -37,17 +37,16 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php index 8822ece6c..73a060f9c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php @@ -37,7 +37,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ ['group_by_level' => 'country'], @@ -45,10 +45,9 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php index 53202abe1..98e7f1ba7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php @@ -38,17 +38,16 @@ class PostalCodeAggregatorTest extends AbstractAggregatorTest return new PostalCodeAggregator($this->rollingDateConverter); } - public function getFormData() + public static function getFormData(): array { return [ ['calc_date' => new RollingDate(RollingDate::T_TODAY)], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php index 1cd012c70..c3841fd1e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php @@ -37,17 +37,16 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php index b850244c0..7238000df 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php @@ -37,17 +37,16 @@ class CreatorAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php index 6fce8d706..3bff92a58 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php @@ -37,17 +37,16 @@ class CreatorJobAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php index 8e8d9276f..26b1298c5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php @@ -37,17 +37,16 @@ class CreatorScopeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php index 6061a511c..df3307b86 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php @@ -37,17 +37,16 @@ final class GoalAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php index 60abafb49..0098d9b9c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php @@ -37,17 +37,16 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php index b4101261b..eef2f8840 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php @@ -37,17 +37,16 @@ class HandlingThirdPartyAggregatorTest extends AbstractAggregatorTest return self::$handlingThirdPartyAggregator; } - public function getFormData() + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders() + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php index b885c3177..8b4ae0dc7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php @@ -37,17 +37,16 @@ final class JobAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php index 2882c79f0..fd1f0ffc5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php @@ -38,7 +38,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], // there are previous saved export which does not contains any data @@ -48,10 +48,9 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php index 1960027b4..28f970dd0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php @@ -37,17 +37,16 @@ final class ResultAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer() ->get(EntityManagerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php index 54d01528a..26aeb6690 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php @@ -37,17 +37,16 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest return $this->aggregator; } - public function getFormData(): array + public static function getFormData(): array { return [ [], ]; } - public function getQueryBuilders(): array + public static function getQueryBuilders(): iterable { self::bootKernel(); - $em = self::getContainer()->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php index b18e12010..8fba85161 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php @@ -49,8 +49,11 @@ final class SocialIssueFilterTest extends AbstractFilterTest ->getQuery() ->setMaxResults(1) ->getResult(); - yield ['accepted_socialissues' => new ArrayCollection($array)]; - yield ['accepted_socialissues' => $array]; + + return [ + ['accepted_socialissues' => new ArrayCollection($array)], + ['accepted_socialissues' => $array], + ]; } public static function getQueryBuilders(): iterable diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php index d78f66b4d..c0c2ec249 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php @@ -40,6 +40,8 @@ final class StepFilterTest extends AbstractFilterTest public static function getFormData(): array { + $data = []; + foreach ([ ['accepted_steps_multi' => [AccompanyingPeriod::STEP_DRAFT]], ['accepted_steps_multi' => [AccompanyingPeriod::STEP_CONFIRMED]], @@ -47,8 +49,10 @@ final class StepFilterTest extends AbstractFilterTest ['accepted_steps_multi' => [AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_SHORT]], ['accepted_steps_multi' => [AccompanyingPeriod::STEP_CLOSED]], ] as $d) { - yield ['calc_date' => new RollingDate(RollingDate::T_TODAY), ...$d]; + $data[] = ['calc_date' => new RollingDate(RollingDate::T_TODAY), ...$d]; } + + return $data; } public static function getQueryBuilders(): iterable diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php index e6ae76ce7..1e365b323 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php @@ -47,14 +47,17 @@ final class UserJobFilterTest extends AbstractFilterTest ->createQuery('SELECT j FROM '.UserJob::class.' j') ->setMaxResults(1) ->getResult(); - yield [ + $data = []; + $data[] = [ 'jobs' => new ArrayCollection($jobs), 'date_calc' => new RollingDate(RollingDate::T_TODAY), ]; - yield [ + $data[] = [ 'jobs' => $jobs, 'date_calc' => new RollingDate(RollingDate::T_TODAY), ]; + + return $data; } public static function getQueryBuilders(): iterable