From 1098bafd3d62272b5687d3a5fb955cd3235ce637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 14 Dec 2023 23:36:56 +0100 Subject: [PATCH] Replaced the deprecated 'self::$container->get' with 'self::getContainer()->get' using rector This change is made to comply with the new Symfony standards and to avoid deprecation warnings for future versions. The update touches various functionalities, including retrieving EntityManagerInterface instance and various service classes within the test files. --- rector.php | 3 ++ .../ByActivityTypeAggregatorTest.php | 8 ++--- .../BySocialActionAggregatorTest.php | 4 +-- .../BySocialIssueAggregatorTest.php | 4 +-- .../ActivityPresenceAggregatorTest.php | 6 ++-- .../Aggregator/ActivityTypeAggregatorTest.php | 6 ++-- .../Aggregator/ActivityUserAggregatorTest.php | 6 ++-- .../Aggregator/ByThirdpartyAggregatorTest.php | 4 +-- .../Aggregator/ByUserAggregatorTest.php | 4 +-- .../Aggregator/CreatorJobAggregatorTest.php | 4 +-- .../Aggregator/CreatorScopeAggregatorTest.php | 4 +-- .../Export/Aggregator/DateAggregatorTest.php | 4 +-- .../Aggregator/LocationTypeAggregatorTest.php | 4 +-- .../ActivityReasonAggregatorTest.php | 6 ++-- .../PersonAggregatorTest.php | 4 +-- .../Aggregator/PersonsAggregatorTest.php | 4 +-- .../LinkedToACP/AvgActivityDurationTest.php | 2 +- .../AvgActivityVisitDurationTest.php | 2 +- .../Export/LinkedToACP/CountActivityTest.php | 2 +- .../CountHouseholdOnActivityTest.php | 2 +- .../CountPersonsOnActivityTest.php | 2 +- .../LinkedToACP/SumActivityDurationTest.php | 2 +- .../SumActivityVisitDurationTest.php | 4 +-- .../LinkedToPerson/CountActivityTest.php | 2 +- .../CountHouseholdOnActivityTest.php | 2 +- .../LinkedToPerson/ListActivityTest.php | 10 +++--- .../StatActivityDurationTest.php | 2 +- .../ACPFilters/ActivityTypeFilterTest.php | 6 ++-- .../Filter/ACPFilters/ByCreatorFilterTest.php | 6 ++-- .../ACPFilters/BySocialActionFilterTest.php | 6 ++-- .../ACPFilters/BySocialIssueFilterTest.php | 6 ++-- .../Export/Filter/ActivityDateFilterTest.php | 4 +-- .../Filter/ActivityPresenceFilterTest.php | 8 ++--- .../Filter/ActivityReasonFilterTest.php | 8 ++--- .../Export/Filter/ActivityTypeFilterTest.php | 6 ++-- .../Export/Filter/ByCreatorFilterTest.php | 6 ++-- .../Export/Filter/CreatorJobFilterTest.php | 8 ++--- .../Export/Filter/CreatorScopeFilterTest.php | 6 ++-- .../Export/Filter/EmergencyFilterTest.php | 4 +-- .../Export/Filter/LocationTypeFilterTest.php | 6 ++-- .../ActivityReasonFilterTest.php | 6 ++-- ...sonHavingActivityBetweenDateFilterTest.php | 6 ++-- ...sonHavingActivityBetweenDateFilterTest.php | 8 ++--- .../Tests/Export/Filter/PersonsFilterTest.php | 6 ++-- .../Export/Filter/SentReceivedFilterTest.php | 4 +-- .../Tests/Export/Filter/UserFilterTest.php | 6 ++-- .../Type/TranslatableActivityTypeTest.php | 2 +- .../ActivityACLAwareRepositoryTest.php | 10 +++--- ...ActivityDocumentACLAwareRepositoryTest.php | 8 ++--- .../AsideActivityControllerTest.php | 2 +- .../Export/Export/ListAsideActivityTest.php | 2 +- .../Controller/CalendarControllerTest.php | 2 +- ...emoteCalendarMSGraphSyncControllerTest.php | 2 +- .../Export/Aggregator/AgentAggregatorTest.php | 4 +-- .../Aggregator/CancelReasonAggregatorTest.php | 4 +-- .../Export/Aggregator/JobAggregatorTest.php | 4 +-- .../Aggregator/LocationAggregatorTest.php | 4 +-- .../Aggregator/LocationTypeAggregatorTest.php | 4 +-- .../Aggregator/MonthYearAggregatorTest.php | 4 +-- .../Export/Aggregator/ScopeAggregatorTest.php | 4 +-- .../Tests/Export/Filter/AgentFilterTest.php | 6 ++-- .../Export/Filter/BetweenDatesFilterTest.php | 4 +-- .../Tests/Export/Filter/JobFilterTest.php | 6 ++-- .../Tests/Export/Filter/ScopeFilterTest.php | 6 ++-- .../CalendarACLAwareRepositoryTest.php | 2 +- .../Normalizer/CalendarNormalizerTest.php | 2 +- .../BulkCalendarShortMessageSenderTest.php | 4 +-- .../CollectionDocGenNormalizerTest.php | 2 +- .../Normalizer/DocGenObjectNormalizerTest.php | 2 +- .../Service/Context/BaseContextDataTest.php | 2 +- .../Tests/GenericDoc/ManagerTest.php | 4 +-- ...ngCourseDocumentGenericDocProviderTest.php | 2 +- .../PersonDocumentGenericDocProviderTest.php | 4 +-- .../PersonDocumentACLAwareRepositoryTest.php | 4 +-- .../Normalizer/SignedUrlNormalizerTest.php | 2 +- .../SignedUrlPostNormalizerTest.php | 2 +- .../Test/Export/AbstractAggregatorTest.php | 4 +-- .../Test/Export/AbstractFilterTest.php | 4 +-- .../Authorization/ParentRoleHelperTest.php | 2 +- .../Controller/AddressControllerTest.php | 2 +- .../AddressReferenceApiControllerTest.php | 2 +- ...ddressToReferenceMatcherControllerTest.php | 8 ++--- ...raphicalUnitByAddressApiControllerTest.php | 2 +- .../NotificationApiControllerTest.php | 10 +++--- .../Tests/Controller/UserControllerTest.php | 8 ++--- .../Cron/CronJobDatabaseInteractionTest.php | 6 ++-- .../Tests/Doctrine/DQL/AgeTest.php | 2 +- .../Tests/Doctrine/DQL/GreatestTest.php | 2 +- .../Doctrine/DQL/JsonBuildObjectTest.php | 2 +- .../Tests/Doctrine/DQL/JsonExtractTest.php | 2 +- .../Doctrine/DQL/JsonbExistsInArrayTest.php | 2 +- .../Tests/Doctrine/DQL/LeastTest.php | 2 +- .../Tests/Entity/NotificationTest.php | 6 ++-- .../AccompanyingCourseExportHelperTest.php | 4 +-- .../Tests/Export/ExportManagerTest.php | 12 +++---- .../Tests/Export/SortExportElementTest.php | 6 ++-- .../Authorization/AuthorizationHelperTest.php | 2 +- .../PasswordRecover/TokenManagerTest.php | 2 +- .../Resolver/CenterResolverDispatcherTest.php | 2 +- .../DoctrineExistingEntityNormalizerTest.php | 6 ++-- ...teAddressWithReferenceOrPostalCodeTest.php | 2 +- ...aphicalUnitMaterializedViewCronJobTest.php | 2 +- .../AddressReferenceBaseImporterTest.php | 8 ++--- .../Import/AddressToReferenceMatcherTest.php | 10 +++--- .../GeographicalUnitBaseImporterTest.php | 4 +-- .../Import/PostalCodeBaseImporterTest.php | 8 ++--- .../Tests/Services/MenuComposerTest.php | 2 +- .../Templating/Entity/AddressRenderTest.php | 36 +++++++++---------- .../AccompanyingPeriodConfidentialTest.php | 2 +- .../Tests/Action/Remove/PersonMoveTest.php | 12 +++---- .../AccompanyingCourseApiControllerTest.php | 18 +++++----- .../AccompanyingCourseControllerTest.php | 4 +-- .../Controller/HouseholdApiControllerTest.php | 8 ++--- .../Controller/HouseholdControllerTest.php | 2 +- .../HouseholdMemberControllerTest.php | 6 ++-- .../Controller/PersonApiControllerTest.php | 4 +-- .../Controller/PersonControllerCreateTest.php | 2 +- .../Controller/PersonControllerUpdateTest.php | 8 ++--- .../Controller/PersonControllerViewTest.php | 6 ++-- .../PersonDuplicateControllerViewTest.php | 4 +-- .../RelationshipApiControllerTest.php | 4 +-- .../SocialWorkEvaluationApiControllerTest.php | 4 +-- .../AdministrativeLocationAggregatorTest.php | 4 +-- .../ClosingDateAggregatorTest.php | 6 ++-- .../ClosingMotiveAggregatorTest.php | 4 +-- .../ConfidentialAggregatorTest.php | 4 +-- .../DurationAggregatorTest.php | 4 +-- .../EmergencyAggregatorTest.php | 4 +-- .../EvaluationAggregatorTest.php | 4 +-- .../GeographicalUnitStatAggregatorTest.php | 6 ++-- .../IntensityAggregatorTest.php | 4 +-- .../OpeningDateAggregatorTest.php | 6 ++-- .../OriginAggregatorTest.php | 4 +-- .../ReferrerAggregatorTest.php | 4 +-- .../ReferrerScopeAggregatorTest.php | 2 +- .../RequestorAggregatorTest.php | 4 +-- .../ScopeAggregatorTest.php | 4 +-- .../SocialActionAggregatorTest.php | 4 +-- .../SocialIssueAggregatorTest.php | 4 +-- .../StepAggregatorTest.php | 4 +-- .../UserJobAggregatorTest.php | 4 +-- .../EvaluationTypeAggregatorTest.php | 4 +-- .../ChildrenNumberAggregatorTest.php | 4 +-- .../CompositionAggregatorTest.php | 4 +-- .../PersonAggregators/AgeAggregatorTest.php | 4 +-- .../CountryOfBirthAggregatorTest.php | 4 +-- .../GenderAggregatorTest.php | 4 +-- .../HouseholdPositionAggregatorTest.php | 4 +-- .../MaritalStatusAggregatorTest.php | 4 +-- .../NationalityAggregatorTest.php | 4 +-- .../PostalCodeAggregatorTest.php | 4 +-- .../ActionTypeAggregatorTest.php | 4 +-- .../CreatorAggregatorTest.php | 4 +-- .../CreatorJobAggregatorTest.php | 4 +-- .../CreatorScopeAggregatorTest.php | 4 +-- .../GoalAggregatorTest.php | 4 +-- .../GoalResultAggregatorTest.php | 4 +-- .../HandlingThirdPartyAggregatorTest.php | 4 +-- .../JobAggregatorTest.php | 4 +-- .../ReferrerAggregatorTest.php | 4 +-- .../ResultAggregatorTest.php | 4 +-- .../ScopeAggregatorTest.php | 4 +-- ...rsonAssociatedOnAccompanyingPeriodTest.php | 2 +- ...rationAPWorkPersonAssociatedOnWorkTest.php | 2 +- .../Export/CountAccompanyingCourseTest.php | 2 +- ...ssociatePersonOnAccompanyingPeriodTest.php | 2 +- ...ingPeriodWorkAssociatePersonOnWorkTest.php | 2 +- .../Export/CountHouseholdInPeriodTest.php | 4 +-- ...ingPeriodWorkAssociatePersonOnWorkTest.php | 2 +- .../Tests/Export/Export/CountPersonTest.php | 2 +- .../CountPersonWithAccompanyingCourseTest.php | 2 +- .../Export/ListAccompanyingPeriodTest.php | 10 +++--- ...ssociatePersonOnAccompanyingPeriodTest.php | 24 ++++++------- ...ingPeriodWorkAssociatePersonOnWorkTest.php | 24 ++++++------- .../Export/Export/ListEvaluationTest.php | 24 ++++++------- .../Export/ListHouseholdInPeriodTest.php | 10 +++--- ...ListPersonHavingAccompanyingPeriodTest.php | 8 ++--- .../Tests/Export/Export/ListPersonTest.php | 14 ++++---- ...ersonWithAccompanyingPeriodDetailsTest.php | 8 ++--- .../StatAccompanyingCourseDurationTest.php | 6 ++-- .../ActiveOnDateFilterTest.php | 4 +-- .../ActiveOneDayBetweenDatesFilterTest.php | 4 +-- .../AdministrativeLocationFilterTest.php | 6 ++-- .../ClosingMotiveFilterTest.php | 6 ++-- .../ConfidentialFilterTest.php | 4 +-- .../EmergencyFilterTest.php | 4 +-- .../EvaluationFilterTest.php | 6 ++-- .../GeographicalUnitStatFilterTest.php | 6 ++-- .../IntensityFilterTest.php | 4 +-- .../OpenBetweenDatesFilterTest.php | 4 +-- .../OriginFilterTest.php | 6 ++-- .../ReferrerFilterTest.php | 6 ++-- .../RequestorFilterTest.php | 4 +-- .../SocialActionFilterTest.php | 6 ++-- .../SocialIssueFilterTest.php | 6 ++-- .../StepFilterTest.php | 4 +-- .../UserJobFilterTest.php | 6 ++-- .../UserScopeFilterTest.php | 6 ++-- .../EvaluationTypeFilterTest.php | 6 ++-- .../EvaluationFilters/MaxDateFilterTest.php | 4 +-- .../CompositionFilterTest.php | 6 ++-- .../Filter/PersonFilters/AgeFilterTest.php | 4 +-- .../PersonFilters/BirthdateFilterTest.php | 4 +-- .../PersonFilters/DeadOrAliveFilterTest.php | 4 +-- .../PersonFilters/DeathdateFilterTest.php | 4 +-- .../Filter/PersonFilters/GenderFilterTest.php | 4 +-- .../PersonFilters/MaritalStatusFilterTest.php | 6 ++-- .../PersonFilters/NationalityFilterTest.php | 6 ++-- ...sidentialAddressAtThirdpartyFilterTest.php | 6 ++-- .../ResidentialAddressAtUserFilterTest.php | 4 +-- .../SocialWorkFilters/CreatorFilterTest.php | 6 ++-- .../CreatorJobFilterTest.php | 6 ++-- .../CreatorScopeFilterTest.php | 6 ++-- .../HandlingThirdPartyFilterTest.php | 6 ++-- .../SocialWorkFilters/JobFilterTest.php | 6 ++-- .../SocialWorkFilters/ReferrerFilterTest.php | 6 ++-- .../SocialWorkFilters/ScopeFilterTest.php | 6 ++-- ...FilterListAccompanyingPeriodHelperTest.php | 6 ++-- .../Tests/Form/Type/PickPersonTypeTest.php | 10 +++--- ...companyingPeriodACLAwareRepositoryTest.php | 16 ++++----- .../PersonACLAwareRepositoryTest.php | 6 ++-- .../Tests/Repository/UserRepositoryTest.php | 2 +- .../Authorization/PersonVoterTest.php | 2 +- ...AccompanyingPeriodDocGenNormalizerTest.php | 2 +- ...AccompanyingPeriodOriginNormalizerTest.php | 2 +- ...companyingPeriodResourceNormalizerTest.php | 2 +- ...mpanyingPeriodWorkDocGenNormalizerTest.php | 2 +- .../Normalizer/HouseholdNormalizerTest.php | 4 +-- .../Normalizer/PersonDocGenNormalizerTest.php | 16 ++++----- .../Normalizer/PersonJsonNormalizerTest.php | 10 +++--- .../Normalizer/ResourceJsonNormalizerTest.php | 2 +- .../Normalizer/SocialActionNormalizerTest.php | 2 +- .../Normalizer/SocialIssueNormalizerTest.php | 2 +- .../AccompanyingPeriodContextTest.php | 22 ++++++------ .../DocGenerator/PersonContextTest.php | 18 +++++----- ...ngPeriodCalendarGenericDocProviderTest.php | 4 +-- ...odWorkEvaluationGenericDocProviderTest.php | 2 +- .../PersonCalendarGenericDocProviderTest.php | 4 +-- .../Entity/ClosingMotiveRenderTest.php | 2 +- .../TimelineAccompanyingPeriodTest.php | 2 +- .../Tests/Validation/PersonValidationTest.php | 2 +- .../Validator/Person/PersonValidationTest.php | 2 +- .../Workflows/AccompanyingPeriodLifecycle.php | 2 +- .../Export/Filter/ReportDateFilterTest.php | 4 +-- .../SingleTaskACLAwareRepositoryTest.php | 10 +++--- .../ThirdPartyDocGenNormalizerTest.php | 2 +- .../ThirdPartyJsonDenormalizerTest.php | 2 +- .../Wopi/ChillDocumentLockManagerTest.php | 2 +- 248 files changed, 631 insertions(+), 628 deletions(-) diff --git a/rector.php b/rector.php index a40000b1e..cf0745174 100644 --- a/rector.php +++ b/rector.php @@ -27,6 +27,9 @@ return static function (RectorConfig $rectorConfig): void { // register a single rule $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + + // part of the symfony 54 rules + $rectorConfig->rule(\Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector::class); $rectorConfig->disableParallel(); //define sets of rules diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php index 2d78585f7..83718733e 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php @@ -36,9 +36,9 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest parent::setUp(); self::bootKernel(); - $this->rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); - $this->activityTypeRepository = self::$container->get(ActivityTypeRepositoryInterface::class); - $this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class); + $this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); + $this->activityTypeRepository = self::getContainer()->get(ActivityTypeRepositoryInterface::class); + $this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class); } public function getAggregator() @@ -76,7 +76,7 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php index 6cb0eb299..7a986f6ea 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php @@ -29,7 +29,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.activity.export.bysocialaction_aggregator'); + $this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator'); } public function getAggregator() @@ -48,7 +48,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php index 583e950a6..3a42efe0e 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php @@ -29,7 +29,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.activity.export.bysocialissue_aggregator'); + $this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator'); } public function getAggregator() @@ -48,7 +48,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php index ea2bafb0d..719bbe37e 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php @@ -31,8 +31,8 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest protected function setUp(): void { self::bootKernel(); - $this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class); - $this->activityPresenceRepository = self::$container->get(ActivityPresenceRepositoryInterface::class); + $this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class); + $this->activityPresenceRepository = self::getContainer()->get(ActivityPresenceRepositoryInterface::class); } public function getAggregator() @@ -51,7 +51,7 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php index bb0906be6..16c26d194 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php @@ -34,14 +34,14 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(ActivityTypeAggregator::class); + $this->aggregator = self::getContainer()->get(ActivityTypeAggregator::class); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$container->get('request_stack') + self::getContainer()->get('request_stack') ->push($request->reveal()); } @@ -61,7 +61,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php index 0cd7fe14d..8708f8151 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php @@ -34,14 +34,14 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.activity.export.user_aggregator'); + $this->aggregator = self::getContainer()->get('chill.activity.export.user_aggregator'); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$container->get('request_stack') + self::getContainer()->get('request_stack') ->push($request->reveal()); } @@ -61,7 +61,7 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php index 0558c3f2b..20f311d9b 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php @@ -29,7 +29,7 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(ByThirdpartyAggregator::class); + $this->aggregator = self::getContainer()->get(ByThirdpartyAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php index 3e8359ab8..6ef724077 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php @@ -29,7 +29,7 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(ByCreatorAggregator::class); + $this->aggregator = self::getContainer()->get(ByCreatorAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php index 9a821de75..8084a5a45 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php @@ -29,7 +29,7 @@ final class CreatorJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(CreatorJobAggregator::class); + $this->aggregator = self::getContainer()->get(CreatorJobAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ final class CreatorJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php index 49c1d746f..5c053e2ec 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php @@ -29,7 +29,7 @@ final class CreatorScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(CreatorScopeAggregator::class); + $this->aggregator = self::getContainer()->get(CreatorScopeAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ final class CreatorScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php index db3a3ff76..952725a30 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php @@ -29,7 +29,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(DateAggregator::class); + $this->aggregator = self::getContainer()->get(DateAggregator::class); } public function getAggregator() @@ -56,7 +56,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php index 663901edd..d49412fe5 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php @@ -29,7 +29,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(LocationTypeAggregator::class); + $this->aggregator = self::getContainer()->get(LocationTypeAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php index 004de0b99..13e06f353 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php @@ -32,14 +32,14 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(ActivityReasonAggregator::class); + $this->aggregator = self::getContainer()->get(ActivityReasonAggregator::class); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$container->get('request_stack') + self::getContainer()->get('request_stack') ->push($request->reveal()); } @@ -60,7 +60,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php index 388f13793..026dc6cf4 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php @@ -29,7 +29,7 @@ class PersonAggregatorTest extends AbstractAggregatorTest protected function setUp(): void { self::bootKernel(); - $this->labelPersonHelper = self::$container->get(LabelPersonHelper::class); + $this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class); } public function getAggregator() @@ -46,7 +46,7 @@ class PersonAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php index b067e308d..4bdfbb262 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php @@ -30,7 +30,7 @@ class PersonsAggregatorTest extends AbstractAggregatorTest { parent::setUp(); self::bootKernel(); - $this->labelPersonHelper = self::$container->get(LabelPersonHelper::class); + $this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class); } public function getAggregator() @@ -49,7 +49,7 @@ class PersonsAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityDurationTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityDurationTest.php index c8010c327..fc9a4cdd2 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityDurationTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityDurationTest.php @@ -29,7 +29,7 @@ final class AvgActivityDurationTest extends AbstractExportTest public function getExport() { - $activityRepository = self::$container->get(ActivityRepository::class); + $activityRepository = self::getContainer()->get(ActivityRepository::class); yield new AvgActivityDuration($activityRepository, $this->getParameters(true)); yield new AvgActivityDuration($activityRepository, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityVisitDurationTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityVisitDurationTest.php index 414e72960..427e19e95 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityVisitDurationTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/AvgActivityVisitDurationTest.php @@ -29,7 +29,7 @@ final class AvgActivityVisitDurationTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new AvgActivityVisitDuration($em, $this->getParameters(true)); yield new AvgActivityVisitDuration($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountActivityTest.php index 174bcc790..efcb54adf 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountActivityTest.php @@ -29,7 +29,7 @@ final class CountActivityTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountActivity($em, $this->getParameters(true)); yield new CountActivity($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountHouseholdOnActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountHouseholdOnActivityTest.php index 132813176..a13f44ec6 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountHouseholdOnActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountHouseholdOnActivityTest.php @@ -29,7 +29,7 @@ class CountHouseholdOnActivityTest extends AbstractExportTest protected function setUp(): void { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function getExport() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountPersonsOnActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountPersonsOnActivityTest.php index 25d6643fb..4b8f2ed69 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountPersonsOnActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/CountPersonsOnActivityTest.php @@ -31,7 +31,7 @@ class CountPersonsOnActivityTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountPersonsOnActivity($em, $this->getParameters(true)); yield new CountPersonsOnActivity($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityDurationTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityDurationTest.php index f538ad3ea..ccd43f128 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityDurationTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityDurationTest.php @@ -29,7 +29,7 @@ final class SumActivityDurationTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new SumActivityDuration($em, $this->getParameters(true)); yield new SumActivityDuration($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php index 95d4b597f..42d263f0c 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToACP/SumActivityVisitDurationTest.php @@ -28,12 +28,12 @@ final class SumActivityVisitDurationTest extends AbstractExportTest { self::bootKernel(); - $this->export = self::$container->get('chill.activity.export.sum_activity_visit_duration_linked_to_acp'); + $this->export = self::getContainer()->get('chill.activity.export.sum_activity_visit_duration_linked_to_acp'); } public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new SumActivityVisitDuration($em, $this->getParameters(true)); yield new SumActivityVisitDuration($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountActivityTest.php index 8759dceb3..e9df683f4 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountActivityTest.php @@ -29,7 +29,7 @@ final class CountActivityTest extends AbstractExportTest public function getExport() { - $activityRepository = self::$container->get(ActivityRepository::class); + $activityRepository = self::getContainer()->get(ActivityRepository::class); yield new CountActivity($activityRepository, $this->getParameters(true)); yield new CountActivity($activityRepository, $this->getParameters(false)); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountHouseholdOnActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountHouseholdOnActivityTest.php index 65fdc6c4c..a2b4e6207 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountHouseholdOnActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/CountHouseholdOnActivityTest.php @@ -29,7 +29,7 @@ class CountHouseholdOnActivityTest extends AbstractExportTest protected function setUp(): void { self::bootKernel(); - $this->activityRepository = self::$container->get(ActivityRepository::class); + $this->activityRepository = self::getContainer()->get(ActivityRepository::class); } public function getExport() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php index a6b6903f2..6d2c85344 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/ListActivityTest.php @@ -39,16 +39,16 @@ final class ListActivityTest extends AbstractExportTest $request->getLocale()->willReturn('fr'); - self::$container->get('request_stack') + self::getContainer()->get('request_stack') ->push($request->reveal()); } public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); - $translator = self::$container->get(TranslatorInterface::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class); - $activityRepository = self::$container->get(ActivityRepository::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $translator = self::getContainer()->get(TranslatorInterface::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class); + $activityRepository = self::getContainer()->get(ActivityRepository::class); yield new ListActivity( $em, diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/StatActivityDurationTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/StatActivityDurationTest.php index 8f4e98452..3166e0a3c 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/StatActivityDurationTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Export/LinkedToPerson/StatActivityDurationTest.php @@ -33,7 +33,7 @@ final class StatActivityDurationTest extends AbstractExportTest public function getExport() { - $activityRepository = self::$container->get(ActivityRepository::class); + $activityRepository = self::getContainer()->get(ActivityRepository::class); yield new StatActivityDuration($activityRepository, $this->getParameters(true), 'sum'); yield new StatActivityDuration($activityRepository, $this->getParameters(false), 'sum'); } diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php index 3701459da..f5ca24a14 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php @@ -33,7 +33,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(\Chill\ActivityBundle\Export\Filter\ACPFilters\ActivityTypeFilter::class); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\ACPFilters\ActivityTypeFilter::class); } public function getFilter() @@ -44,7 +44,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(ActivityType::class, 'at') @@ -90,7 +90,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php index 0b0c1f029..773b8c5d3 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php @@ -30,7 +30,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(ByCreatorFilter::class); + $this->filter = self::getContainer()->get(ByCreatorFilter::class); } public function getFilter() @@ -41,7 +41,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(User::class, 'u') @@ -65,7 +65,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php index e6ec47666..0ff72b061 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php @@ -30,7 +30,7 @@ final class BySocialActionFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(\Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialActionFilter::class); + $this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialActionFilter::class); } public function getFilter() @@ -42,7 +42,7 @@ final class BySocialActionFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(SocialAction::class, 'sa') @@ -65,7 +65,7 @@ final class BySocialActionFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php index 47f45ceb5..0f567d8a2 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php @@ -31,7 +31,7 @@ final class BySocialIssueFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(BySocialIssueFilter::class); + $this->filter = self::getContainer()->get(BySocialIssueFilter::class); } public function getFilter() @@ -42,7 +42,7 @@ final class BySocialIssueFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(SocialIssue::class, 'si') @@ -68,7 +68,7 @@ final class BySocialIssueFilterTest extends AbstractFilterTest self::bootKernel(); } - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php index 4cefb136a..fa09a6cb0 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php @@ -30,7 +30,7 @@ final class ActivityDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(ActivityDateFilter::class); + $this->filter = self::getContainer()->get(ActivityDateFilter::class); } public function getFilter() @@ -52,7 +52,7 @@ final class ActivityDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->select('count(activity.id)') diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php index 6fc3d10d8..de4c54495 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php @@ -35,8 +35,8 @@ class ActivityPresenceFilterTest extends AbstractFilterTest parent::setUp(); self::bootKernel(); - $this->translator = self::$container->get(TranslatorInterface::class); - $this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class); + $this->translator = self::getContainer()->get(TranslatorInterface::class); + $this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class); } public function getFilter() @@ -48,7 +48,7 @@ class ActivityPresenceFilterTest extends AbstractFilterTest { self::bootKernel(); - $presences = self::$container->get(ActivityPresenceRepositoryInterface::class) + $presences = self::getContainer()->get(ActivityPresenceRepositoryInterface::class) ->findAll(); return [ @@ -65,7 +65,7 @@ class ActivityPresenceFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->select('count(activity.id)') diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php index c018efa18..a9687d15a 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php @@ -33,14 +33,14 @@ final class ActivityReasonFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.activity.export.reason_filter'); + $this->filter = self::getContainer()->get('chill.activity.export.reason_filter'); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$container->get(RequestStack::class) + self::getContainer()->get(RequestStack::class) ->push($request->reveal()); } @@ -54,7 +54,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest self::bootKernel(); $data = []; - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); $reasons = $em->createQuery('SELECT reason ' @@ -76,7 +76,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->select('count(activity.id)') diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php index 376614228..87349dd12 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php @@ -31,7 +31,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.activity.export.type_filter'); + $this->filter = self::getContainer()->get('chill.activity.export.type_filter'); } public function getFilter() @@ -43,7 +43,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(ActivityType::class, 'at') @@ -69,7 +69,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->select('count(activity.id)') diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php index d5073b625..9da5403b3 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php @@ -30,7 +30,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(ByCreatorFilter::class); + $this->filter = self::getContainer()->get(ByCreatorFilter::class); } public function getFilter() @@ -40,7 +40,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest public function getFormData(): array { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(User::class, 'u') @@ -65,7 +65,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest self::bootKernel(); } - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php index bbf9b830e..d7cbc1f39 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php @@ -36,10 +36,10 @@ class CreatorJobFilterTest extends AbstractFilterTest parent::setUp(); self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class); - $this->translator = self::$container->get(TranslatorInterface::class); - $this->userJobRepository = self::$container->get(UserJobRepositoryInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class); + $this->translator = self::getContainer()->get(TranslatorInterface::class); + $this->userJobRepository = self::getContainer()->get(UserJobRepositoryInterface::class); } public function getFilter() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php index bf11b0320..f1ec8b63c 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php @@ -30,7 +30,7 @@ final class CreatorScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(CreatorScopeFilter::class); + $this->filter = self::getContainer()->get(CreatorScopeFilter::class); } public function getFilter() @@ -41,7 +41,7 @@ final class CreatorScopeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(Scope::class, 's') @@ -65,7 +65,7 @@ final class CreatorScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php index 5ef1879a7..79abc750d 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php @@ -29,7 +29,7 @@ final class EmergencyFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(EmergencyFilter::class); + $this->filter = self::getContainer()->get(EmergencyFilter::class); } public function getFilter() @@ -49,7 +49,7 @@ final class EmergencyFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php index bf52ceee1..17db5e622 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php @@ -30,7 +30,7 @@ final class LocationTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(LocationTypeFilter::class); + $this->filter = self::getContainer()->get(LocationTypeFilter::class); } public function getFilter() @@ -41,7 +41,7 @@ final class LocationTypeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(LocationType::class, 'lt') @@ -65,7 +65,7 @@ final class LocationTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php index 6ad78579e..b96f1ead5 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php @@ -31,7 +31,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.activity.export.reason_filter'); + $this->filter = self::getContainer()->get('chill.activity.export.reason_filter'); } public function getFilter() @@ -42,7 +42,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(ActivityReason::class, 'ar') @@ -66,7 +66,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php index 34a9c8303..b4f816dea 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php @@ -30,7 +30,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.activity.export.person_having_an_activity_between_date_filter'); + $this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter'); } public function getFilter() @@ -41,7 +41,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(ActivityReason::class, 'ar') @@ -69,7 +69,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest self::bootKernel(); } - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php index a2ea7c158..8ff85221f 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php @@ -32,14 +32,14 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.activity.export.person_having_an_activity_between_date_filter'); + $this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter'); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$container->get(RequestStack::class) + self::getContainer()->get(RequestStack::class) ->push($request->reveal()); } @@ -71,7 +71,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); yield $em->createQueryBuilder() @@ -98,7 +98,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $managerRegistry = self::$container->get(ManagerRegistry::class); + $managerRegistry = self::getContainer()->get(ManagerRegistry::class); $requestStack = new RequestStack(); $requestStack->push(new Request()); diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php index cefc226e7..17dcda570 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php @@ -31,7 +31,7 @@ class PersonsFilterTest extends AbstractFilterTest { parent::setUp(); self::bootKernel(); - $this->personRender = self::$container->get(PersonRenderInterface::class); + $this->personRender = self::getContainer()->get(PersonRenderInterface::class); } public function getFilter() @@ -42,7 +42,7 @@ class PersonsFilterTest extends AbstractFilterTest public function getFormData() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $persons = $em->createQuery('SELECT p FROM '.Person::class.' p ') ->setMaxResults(2) @@ -61,7 +61,7 @@ class PersonsFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->select('count(activity.id)') diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php index f368e69fa..c782fd4f6 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php @@ -29,7 +29,7 @@ final class SentReceivedFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(SentReceivedFilter::class); + $this->filter = self::getContainer()->get(SentReceivedFilter::class); } public function getFilter() @@ -49,7 +49,7 @@ final class SentReceivedFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php index ef8f4c6b2..94383565b 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php @@ -30,7 +30,7 @@ final class UserFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(UserFilter::class); + $this->filter = self::getContainer()->get(UserFilter::class); } public function getFilter() @@ -41,7 +41,7 @@ final class UserFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(User::class, 'u') @@ -65,7 +65,7 @@ final class UserFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php index 80779d909..f48179614 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php @@ -32,7 +32,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase { self::bootKernel(); - $this->builder = self::$container + $this->builder = self::getContainer() ->get('form.factory') ->createBuilder(FormType::class, null, [ 'csrf_protection' => false, diff --git a/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityACLAwareRepositoryTest.php b/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityACLAwareRepositoryTest.php index 88eb3e7f8..f0036612d 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityACLAwareRepositoryTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityACLAwareRepositoryTest.php @@ -55,11 +55,11 @@ class ActivityACLAwareRepositoryTest extends KernelTestCase { self::bootKernel(); - $this->authorizationHelperForCurrentUser = self::$container->get(AuthorizationHelperForCurrentUserInterface::class); - $this->centerResolverManager = self::$container->get(CenterResolverManagerInterface::class); - $this->activityRepository = self::$container->get(ActivityRepository::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->security = self::$container->get(Security::class); + $this->authorizationHelperForCurrentUser = self::getContainer()->get(AuthorizationHelperForCurrentUserInterface::class); + $this->centerResolverManager = self::getContainer()->get(CenterResolverManagerInterface::class); + $this->activityRepository = self::getContainer()->get(ActivityRepository::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->security = self::getContainer()->get(Security::class); $this->requestStack = $requestStack = new RequestStack(); $request = $this->prophesize(Request::class); diff --git a/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityDocumentACLAwareRepositoryTest.php b/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityDocumentACLAwareRepositoryTest.php index c32714641..b8f1842c2 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityDocumentACLAwareRepositoryTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Repository/ActivityDocumentACLAwareRepositoryTest.php @@ -45,10 +45,10 @@ class ActivityDocumentACLAwareRepositoryTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->centerResolverManager = self::$container->get(CenterResolverManagerInterface::class); - $this->authorizationHelperForCurrentUser = self::$container->get(AuthorizationHelperForCurrentUserInterface::class); - $this->security = self::$container->get(Security::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->centerResolverManager = self::getContainer()->get(CenterResolverManagerInterface::class); + $this->authorizationHelperForCurrentUser = self::getContainer()->get(AuthorizationHelperForCurrentUserInterface::class); + $this->security = self::getContainer()->get(Security::class); } /** diff --git a/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php b/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php index 4a772775f..3c2137d84 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php @@ -34,7 +34,7 @@ final class AsideActivityControllerTest extends WebTestCase { self::bootKernel(); - $qb = self::$container->get(EntityManagerInterface::class) + $qb = self::getContainer()->get(EntityManagerInterface::class) ->createQueryBuilder(); $asideActivityIds = $qb diff --git a/src/Bundle/ChillAsideActivityBundle/src/Tests/Export/Export/ListAsideActivityTest.php b/src/Bundle/ChillAsideActivityBundle/src/Tests/Export/Export/ListAsideActivityTest.php index 29ea8d1f6..aae93c17b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Tests/Export/Export/ListAsideActivityTest.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Tests/Export/Export/ListAsideActivityTest.php @@ -28,7 +28,7 @@ class ListAsideActivityTest extends KernelTestCase { parent::setUp(); self::bootKernel(); - $this->listAsideActivity = self::$container->get(ListAsideActivity::class); + $this->listAsideActivity = self::getContainer()->get(ListAsideActivity::class); } public function testExecuteQuery(): void diff --git a/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php index 80d01ada5..37b97fcf9 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php @@ -45,7 +45,7 @@ final class CalendarControllerTest extends WebTestCase public function provideAccompanyingPeriod(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $nb = $em->createQueryBuilder() ->from(AccompanyingPeriod::class, 'ac') diff --git a/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php index 0c53f2b8d..67214814d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Controller/RemoteCalendarMSGraphSyncControllerTest.php @@ -70,7 +70,7 @@ final class RemoteCalendarMSGraphSyncControllerTest extends WebTestCase $this->assertResponseStatusCodeSame(202); /** @var InMemoryTransport $transport */ - $transport = self::$container->get('messenger.transport.async'); + $transport = self::getContainer()->get('messenger.transport.async'); $this->assertCount(1, $transport->getSent()); } diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php index ae1aa6663..6ceab2d67 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php @@ -36,7 +36,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.agent_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php index 0cc1ba58a..25a6f9c9b 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php @@ -36,7 +36,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.cancel_reason_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php index 50949c3e3..4f4eda4a6 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php @@ -36,7 +36,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.job_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php index c46f9d6da..92c31b88d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php @@ -36,7 +36,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.location_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php index fcf4e2709..9eb2e7d8c 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php @@ -36,7 +36,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.location_type_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php index 7c50a0b52..533e4c19a 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php @@ -36,7 +36,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.month_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php index 77ffc0bf1..c6109a7e9 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php @@ -36,7 +36,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.calendar.export.scope_aggregator'); + $this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator'); } public function getAggregator() @@ -55,7 +55,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php index 3d4efdd83..cef9cf01c 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php @@ -43,7 +43,7 @@ final class AgentFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::$container->get('chill.calendar.export.agent_filter'); + $this->filter = self::getContainer()->get('chill.calendar.export.agent_filter'); } public function getFilter() @@ -54,7 +54,7 @@ final class AgentFilterTest extends AbstractFilterTest public function getFormData(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(User::class, 'u') @@ -77,7 +77,7 @@ final class AgentFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->select('cal.id') diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php index 4a7751433..6cd41601d 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php @@ -43,7 +43,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::$container->get('chill.calendar.export.between_dates_filter'); + $this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter'); } public function getFilter() @@ -65,7 +65,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php index e4bf1ac3b..010157acc 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php @@ -44,7 +44,7 @@ final class JobFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::$container->get('chill.calendar.export.job_filter'); + $this->filter = self::getContainer()->get('chill.calendar.export.job_filter'); } public function getFilter() @@ -55,7 +55,7 @@ final class JobFilterTest extends AbstractFilterTest public function getFormData(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(UserJob::class, 'uj') @@ -75,7 +75,7 @@ final class JobFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php index 194a6cca7..88b2f9bf0 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php @@ -44,7 +44,7 @@ final class ScopeFilterTest extends AbstractFilterTest $request->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - $this->filter = self::$container->get('chill.calendar.export.scope_filter'); + $this->filter = self::getContainer()->get('chill.calendar.export.scope_filter'); } public function getFilter() @@ -55,7 +55,7 @@ final class ScopeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(Scope::class, 's') @@ -75,7 +75,7 @@ final class ScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php b/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php index 8d3101c5b..590ff8d8e 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php @@ -36,7 +36,7 @@ final class CalendarACLAwareRepositoryTest extends KernelTestCase { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function testCountByPerosn() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php index 03ba7f164..95fae8879 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php @@ -32,7 +32,7 @@ final class CalendarNormalizerTest extends KernelTestCase { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizationCalendar() diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php index 308c17237..09c9ddf96 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php @@ -59,7 +59,7 @@ final class BulkCalendarShortMessageSenderTest extends KernelTestCase protected function tearDown(): void { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach ($this->toDelete as [$entity, $id]) { $entity = $em->find($entity, $id); @@ -71,7 +71,7 @@ final class BulkCalendarShortMessageSenderTest extends KernelTestCase public function testSendBulkMessageToEligibleCalendar() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $calendar = new Calendar(); $calendar ->addPerson($this->getRandomPerson($em)) diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/CollectionDocGenNormalizerTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/CollectionDocGenNormalizerTest.php index 610135b04..5f16f8be3 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/CollectionDocGenNormalizerTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/CollectionDocGenNormalizerTest.php @@ -28,7 +28,7 @@ class CollectionDocGenNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizeFilteredArray(): void diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php index a1756b325..542e44973 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php @@ -35,7 +35,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testChangeContextOnAttribute() diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php index 7ce52dee0..2c8814578 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php @@ -59,7 +59,7 @@ final class BaseContextDataTest extends KernelTestCase NormalizerInterface $normalizer = null ): BaseContextData { return new BaseContextData( - $normalizer ?? self::$container->get(NormalizerInterface::class) + $normalizer ?? self::getContainer()->get(NormalizerInterface::class) ); } } diff --git a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php index 1b22a4d2e..8b0d3db2e 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php @@ -41,8 +41,8 @@ class ManagerTest extends KernelTestCase { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); - $this->connection = self::$container->get(Connection::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); + $this->connection = self::getContainer()->get(Connection::class); } public function testCountByAccompanyingPeriod(): void diff --git a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php index edbe59c13..e71989e7c 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php @@ -34,7 +34,7 @@ class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } /** diff --git a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/PersonDocumentGenericDocProviderTest.php b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/PersonDocumentGenericDocProviderTest.php index 6ac8d71eb..5b5b2eeb5 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/PersonDocumentGenericDocProviderTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/PersonDocumentGenericDocProviderTest.php @@ -36,8 +36,8 @@ class PersonDocumentGenericDocProviderTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->personDocumentACLAwareRepository = self::$container->get(PersonDocumentACLAwareRepositoryInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->personDocumentACLAwareRepository = self::getContainer()->get(PersonDocumentACLAwareRepositoryInterface::class); } /** diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php index 6dfd521a1..93a644e72 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php @@ -42,8 +42,8 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->scopeRepository = self::$container->get(ScopeRepositoryInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->scopeRepository = self::getContainer()->get(ScopeRepositoryInterface::class); } /** diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlNormalizerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlNormalizerTest.php index 8cf9c5a6d..cb5294fff 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlNormalizerTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlNormalizerTest.php @@ -30,7 +30,7 @@ class SignedUrlNormalizerTest extends KernelTestCase parent::setUpBeforeClass(); self::bootKernel(); - self::$normalizer = self::$container->get(NormalizerInterface::class); + self::$normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizerSignedUrl(): void diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlPostNormalizerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlPostNormalizerTest.php index 3d510d22b..ceb777f23 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlPostNormalizerTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/SignedUrlPostNormalizerTest.php @@ -30,7 +30,7 @@ class SignedUrlPostNormalizerTest extends KernelTestCase parent::setUpBeforeClass(); self::bootKernel(); - self::$normalizer = self::$container->get(NormalizerInterface::class); + self::$normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizerSignedUrl(): void diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php index e66096c63..ddfc7e135 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php @@ -24,9 +24,9 @@ abstract class AbstractAggregatorTest extends KernelTestCase { public static function tearDownAfterClass(): void { - if (null !== self::$container) { + if (null !== self::getContainer()) { /** @var EntityManagerInterface $em */ - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $em->getConnection()->close(); } self::ensureKernelShutdown(); diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php index 6f5d74de5..b8968b4d1 100644 --- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php +++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php @@ -35,9 +35,9 @@ abstract class AbstractFilterTest extends KernelTestCase public static function tearDownAfterClass(): void { - if (null !== self::$container) { + if (null !== self::getContainer()) { /** @var EntityManagerInterface $em */ - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $em->getConnection()->close(); } self::ensureKernelShutdown(); diff --git a/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php index f5574ef2e..a9aaaa130 100644 --- a/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php @@ -27,7 +27,7 @@ final class ParentRoleHelperTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->parentRoleHelper = self::$container->get(ParentRoleHelper::class); + $this->parentRoleHelper = self::getContainer()->get(ParentRoleHelper::class); } public function testGetReachableRoles() diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php index a45cc7d29..e16293a7e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php @@ -35,7 +35,7 @@ final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\W public function generateAddressIds(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $qb = $em->createQueryBuilder(); $addresses = $qb->select('a')->from(Address::class, 'a') diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php index 36796f47f..dfce605d2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php @@ -29,7 +29,7 @@ final class AddressReferenceApiControllerTest extends WebTestCase { self::bootKernel(); /** @var EntityManagerInterface $em */ - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $postalCode = $em->createQueryBuilder() ->select('pc') diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php index bd8c03860..ec4d3fa09 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php @@ -46,7 +46,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase $this->assertResponseIsSuccessful(); - $this->addressRepository = self::$container->get(AddressRepository::class); + $this->addressRepository = self::getContainer()->get(AddressRepository::class); $address = $this->addressRepository->find($addressId); $this->assertEquals(Address::ADDR_REFERENCE_STATUS_REVIEWED, $address->getRefStatus()); @@ -63,7 +63,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase $this->assertResponseIsSuccessful(); - $this->addressRepository = self::$container->get(AddressRepository::class); + $this->addressRepository = self::getContainer()->get(AddressRepository::class); $address = $this->addressRepository->find($addressId); $this->assertEquals(Address::ADDR_REFERENCE_STATUS_MATCH, $address->getRefStatus()); @@ -75,7 +75,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase public static function addressToReviewProvider(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $nb = $em->createQuery('SELECT count(a) FROM '.Address::class.' a') ->getSingleScalarResult(); @@ -101,7 +101,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase public static function addressUnsyncedProvider(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $nb = $em->createQuery('SELECT count(a) FROM '.AddressReference::class.' a') ->getSingleScalarResult(); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php index cf8fabf66..432beb7fa 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php @@ -40,7 +40,7 @@ class GeographicalUnitByAddressApiControllerTest extends WebTestCase public static function generateRandomAddress(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $nb = $em->createQuery('SELECT COUNT(a) FROM '.Address::class.' a')->getSingleScalarResult(); /** @var \Chill\MainBundle\Entity\Address $random */ diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php index f64451af9..bfd5ea684 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php @@ -32,7 +32,7 @@ final class NotificationApiControllerTest extends WebTestCase protected function tearDown(): void { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach ($this->toDelete as [$className, $id]) { $object = $em->find($className, $id); @@ -45,8 +45,8 @@ final class NotificationApiControllerTest extends WebTestCase public function generateDataMarkAsRead() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); - $userRepository = self::$container->get(UserRepository::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $userRepository = self::getContainer()->get(UserRepository::class); $userA = $userRepository->findOneBy(['username' => 'center a_social']); $userB = $userRepository->findOneBy(['username' => 'center b_social']); @@ -77,10 +77,10 @@ final class NotificationApiControllerTest extends WebTestCase $this->assertResponseIsSuccessful('test marking as read'); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); /** @var Notification $notification */ $notification = $em->find(Notification::class, $notificationId); - $user = self::$container->get(UserRepository::class)->findOneBy(['username' => 'center a_social']); + $user = self::getContainer()->get(UserRepository::class)->findOneBy(['username' => 'center a_social']); $this->assertTrue($notification->isReadBy($user)); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php index 313519b42..6e5d362e0 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php @@ -46,11 +46,11 @@ final class UserControllerTest extends WebTestCase public function dataGenerateUserId() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $user = new User(); $user->setUsername('Test_user '.uniqid()); - $user->setPassword(self::$container->get(UserPasswordEncoderInterface::class)->encodePassword( + $user->setPassword(self::getContainer()->get(UserPasswordEncoderInterface::class)->encodePassword( $user, 'password' )); @@ -157,10 +157,10 @@ final class UserControllerTest extends WebTestCase protected function isPasswordValid($username, $password) { /** @var \Symfony\Component\Security\Core\Encoder\UserPasswordEncoder $passwordEncoder */ - $passwordEncoder = self::$container + $passwordEncoder = self::getContainer() ->get(UserPasswordEncoderInterface::class); - $user = self::$container->get(UserRepositoryInterface::class) + $user = self::getContainer()->get(UserRepositoryInterface::class) ->findOneBy(['username' => $username]); $this->assertTrue($passwordEncoder->isPasswordValid($user, $password)); diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php index 594bd6460..a2033fc08 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php @@ -37,15 +37,15 @@ class CronJobDatabaseInteractionTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->cronJobExecutionRepository = self::$container->get(CronJobExecutionRepository::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->cronJobExecutionRepository = self::getContainer()->get(CronJobExecutionRepository::class); } public static function tearDownAfterClass(): void { self::bootKernel(); - $entityManager = self::$container->get(EntityManagerInterface::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); $entityManager->createQuery('DELETE '.CronJobExecution::class.' cje WHERE cje.key LIKE :key') ->setParameter('key', 'test-with-data') diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php index 212303274..f52e250f3 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php @@ -28,7 +28,7 @@ final class AgeTest extends KernelTestCase { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function generateQueries(): iterable diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php index bba3dccc0..2cf679be7 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php @@ -29,7 +29,7 @@ final class GreatestTest extends KernelTestCase { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function testGreatestInDQL() diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonBuildObjectTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonBuildObjectTest.php index 8feb75617..23665eaf8 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonBuildObjectTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonBuildObjectTest.php @@ -31,7 +31,7 @@ class JsonBuildObjectTest extends KernelTestCase parent::setUp(); self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } /** diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php index 286aa71c9..0c113e804 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php @@ -28,7 +28,7 @@ final class JsonExtractTest extends KernelTestCase { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); } public function dataGenerateDql(): iterable diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php index 31f1714d1..d61f1af0e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php @@ -27,7 +27,7 @@ final class JsonbExistsInArrayTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); } public function testDQLFunctionWorks() diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php index e8bb0f5b1..d7a3dffba 100644 --- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php @@ -29,7 +29,7 @@ final class LeastTest extends KernelTestCase { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function testGreatestInDQL() diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php index c5118479a..f2f259211 100644 --- a/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php @@ -34,7 +34,7 @@ final class NotificationTest extends KernelTestCase protected function tearDown(): void { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach ($this->toDelete as [$className, $id]) { $object = $em->find($className, $id); @@ -47,7 +47,7 @@ final class NotificationTest extends KernelTestCase public function generateNotificationData() { self::bootKernel(); - $userRepository = self::$container->get(UserRepository::class); + $userRepository = self::getContainer()->get(UserRepository::class); $senderId = $userRepository ->findOneBy(['username' => 'center b_social']) @@ -110,7 +110,7 @@ final class NotificationTest extends KernelTestCase */ public function testPrePersistComputeUnread(int $senderId, array $addressesIds) { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $notification = new Notification(); $notification ->setSender($em->find(User::class, $senderId)) diff --git a/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php index f726553e9..fc12c3c86 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/AccompanyingCourseExportHelperTest.php @@ -34,13 +34,13 @@ class AccompanyingCourseExportHelperTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); } public static function tearDownAfterClass(): void { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach (self::$entitiesToDelete as [$class, $id]) { $entity = $em->find($class, $id); diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index b9e597ec0..171472ccc 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -210,7 +210,7 @@ final class ExportManagerTest extends KernelTestCase $filters = []; $aggregators = []; - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $export = $this->prophet->prophesize(); $export->willImplement(ExportInterface::class); @@ -313,7 +313,7 @@ final class ExportManagerTest extends KernelTestCase // add formatter interface $formatter = new \Chill\MainBundle\Export\Formatter\SpreadSheetFormatter( - self::$container->get(TranslatorInterface::class), + self::getContainer()->get(TranslatorInterface::class), $exportManager ); @@ -507,7 +507,7 @@ final class ExportManagerTest extends KernelTestCase array $aggregators = [], array $filters = [], ): ExportManager { - $localUser = $user ?? self::$container->get( + $localUser = $user ?? self::getContainer()->get( UserRepositoryInterface::class ) ->findOneBy(['username' => 'center a_social']); @@ -516,9 +516,9 @@ final class ExportManagerTest extends KernelTestCase $tokenStorage->setToken($token); return new ExportManager( - $logger ?? self::$container->get('logger'), - $authorizationChecker ?? self::$container->get('security.authorization_checker'), - $authorizationHelper ?? self::$container->get('chill.main.security.authorization.helper'), + $logger ?? self::getContainer()->get('logger'), + $authorizationChecker ?? self::getContainer()->get('security.authorization_checker'), + $authorizationHelper ?? self::getContainer()->get('chill.main.security.authorization.helper'), $tokenStorage, $exports, $aggregators, diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php index e7dbaf8fb..02cf0a90f 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php @@ -39,9 +39,9 @@ class SortExportElementTest extends KernelTestCase { self::bootKernel(); - $sorter = self::$container->get(SortExportElement::class); - $translator = self::$container->get(TranslatorInterface::class); - $exportManager = self::$container->get(ExportManager::class); + $sorter = self::getContainer()->get(SortExportElement::class); + $translator = self::getContainer()->get(TranslatorInterface::class); + $exportManager = self::getContainer()->get(ExportManager::class); $filters = $exportManager->getAllFilters(); $sorter->sortFilters($filters); diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php index e74888b83..d95305f8c 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php @@ -581,7 +581,7 @@ final class AuthorizationHelperTest extends KernelTestCase */ private function getAuthorizationHelper() { - return self::$container + return self::getContainer() ->get(AuthorizationHelper::class); } } diff --git a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php index 78956a1d9..052e61f64 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php @@ -28,7 +28,7 @@ final class TokenManagerTest extends KernelTestCase { self::bootKernel(); - $logger = self::$container + $logger = self::getContainer() ->get('logger'); $this->tokenManager = new TokenManager('secret', $logger); diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php index ff4af29d4..b7a38247f 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php @@ -28,7 +28,7 @@ final class CenterResolverDispatcherTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->dispatcher = self::$container->get(CenterResolverDispatcher::class); + $this->dispatcher = self::getContainer()->get(CenterResolverDispatcher::class); } /** diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php index 225f67b3b..3587a406f 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php @@ -29,8 +29,8 @@ final class DoctrineExistingEntityNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); - $serializerFactory = self::$container->get(ClassMetadataFactoryInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $serializerFactory = self::getContainer()->get(ClassMetadataFactoryInterface::class); $this->normalizer = new DoctrineExistingEntityNormalizer($em, $serializerFactory); } @@ -39,7 +39,7 @@ final class DoctrineExistingEntityNormalizerTest extends KernelTestCase { self::bootKernel(); - $userIds = self::$container->get(EntityManagerInterface::class) + $userIds = self::getContainer()->get(EntityManagerInterface::class) ->getRepository(User::class) ->createQueryBuilder('u') ->select('u.id') diff --git a/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeTest.php b/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeTest.php index 9d6af705a..6e1e9428e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeTest.php @@ -28,7 +28,7 @@ class CollateAddressWithReferenceOrPostalCodeTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->connection = self::$container->get(Connection::class); + $this->connection = self::getContainer()->get(Connection::class); } public function testRun(): void diff --git a/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJobTest.php b/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJobTest.php index 827dc7e47..9987efabe 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJobTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJobTest.php @@ -66,7 +66,7 @@ final class RefreshAddressToGeographicalUnitMaterializedViewCronJobTest extends self::bootKernel(); $job = new \Chill\MainBundle\Service\AddressGeographicalUnit\RefreshAddressToGeographicalUnitMaterializedViewCronJob( - self::$container->get(Connection::class), + self::getContainer()->get(Connection::class), new MockClock() ); diff --git a/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php b/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php index 84f0c9fc0..076b65f7e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressReferenceBaseImporterTest.php @@ -38,10 +38,10 @@ final class AddressReferenceBaseImporterTest extends KernelTestCase parent::setUp(); self::bootKernel(); - $this->importer = self::$container->get(AddressReferenceBaseImporter::class); - $this->addressReferenceRepository = self::$container->get(AddressReferenceRepository::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->postalCodeRepository = self::$container->get(PostalCodeRepository::class); + $this->importer = self::getContainer()->get(AddressReferenceBaseImporter::class); + $this->addressReferenceRepository = self::getContainer()->get(AddressReferenceRepository::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->postalCodeRepository = self::getContainer()->get(PostalCodeRepository::class); } public function testImportAddress(): void diff --git a/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressToReferenceMatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressToReferenceMatcherTest.php index 1bc888d59..0e2699fc3 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressToReferenceMatcherTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/Import/AddressToReferenceMatcherTest.php @@ -42,11 +42,11 @@ class AddressToReferenceMatcherTest extends KernelTestCase parent::setUp(); self::bootKernel(); - $this->addressToReferenceMatcher = self::$container->get(AddressToReferenceMatcher::class); - $this->addressReferenceRepository = self::$container->get(AddressReferenceRepository::class); - $this->countryRepository = self::$container->get(CountryRepository::class); - $this->addressReferenceBaseImporter = self::$container->get(AddressReferenceBaseImporter::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->addressToReferenceMatcher = self::getContainer()->get(AddressToReferenceMatcher::class); + $this->addressReferenceRepository = self::getContainer()->get(AddressReferenceRepository::class); + $this->countryRepository = self::getContainer()->get(CountryRepository::class); + $this->addressReferenceBaseImporter = self::getContainer()->get(AddressReferenceBaseImporter::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function testCheckAddressesMatchingReferences(): void diff --git a/src/Bundle/ChillMainBundle/Tests/Services/Import/GeographicalUnitBaseImporterTest.php b/src/Bundle/ChillMainBundle/Tests/Services/Import/GeographicalUnitBaseImporterTest.php index de72492a9..9154f2056 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/Import/GeographicalUnitBaseImporterTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/Import/GeographicalUnitBaseImporterTest.php @@ -34,8 +34,8 @@ final class GeographicalUnitBaseImporterTest extends KernelTestCase self::bootKernel(); - $this->connection = self::$container->get(Connection::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->connection = self::getContainer()->get(Connection::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function testImportUnit(): void diff --git a/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php b/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php index 19c824eff..d7447e7a0 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/Import/PostalCodeBaseImporterTest.php @@ -38,10 +38,10 @@ final class PostalCodeBaseImporterTest extends KernelTestCase self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->importer = self::$container->get(PostalCodeBaseImporter::class); - $this->postalCodeRepository = self::$container->get(PostalCodeRepository::class); - $this->countryRepository = self::$container->get(CountryRepository::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->importer = self::getContainer()->get(PostalCodeBaseImporter::class); + $this->postalCodeRepository = self::getContainer()->get(PostalCodeRepository::class); + $this->countryRepository = self::getContainer()->get(CountryRepository::class); } public function testImportPostalCode(): void diff --git a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php index d365d3567..ae63557eb 100644 --- a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php @@ -36,7 +36,7 @@ final class MenuComposerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(['environment' => 'test']); - $this->menuComposer = self::$container + $this->menuComposer = self::getContainer() ->get('chill.main.menu_composer'); } diff --git a/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php b/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php index 0fb6ff68c..0e72807c5 100644 --- a/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Templating/Entity/AddressRenderTest.php @@ -218,8 +218,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderComplexAddressBE(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -230,8 +230,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderComplexAddressFR(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -242,8 +242,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderNoFullAddressBE(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -254,8 +254,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderStringSimpleAddressBE(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -266,8 +266,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderStringSimpleAddressFR(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -278,8 +278,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderWithBuildingAddressBE(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -290,8 +290,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderWithBuildingAddressFR(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -302,8 +302,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderWithStepsAddressBE(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); @@ -314,8 +314,8 @@ final class AddressRenderTest extends KernelTestCase */ public function testRenderWithStepsAddressFR(Address $addr, string $expectedString): void { - $engine = self::$container->get(\Twig\Environment::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $engine = self::getContainer()->get(\Twig\Environment::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); $renderer = new AddressRender($engine, $translatableStringHelper); $this->assertEquals($expectedString, $renderer->renderString($addr, [])); diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php index 74cf7c83e..948228ce2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/AccompanyingPeriodConfidentialTest.php @@ -98,7 +98,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase 'Marked as incomplete because of a problem in the dataprovider, at line 81.' ); - $period = self::$container->get(AccompanyingPeriodRepository::class) + $period = self::getContainer()->get(AccompanyingPeriodRepository::class) ->find($periodId); $em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager'); diff --git a/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php b/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php index a7acdcc82..b48a3ec4e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php @@ -54,17 +54,17 @@ class PersonMoveTest extends KernelTestCase public function setUp(): void { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); - $this->personMoveManager = self::$container->get(PersonMoveManager::class); - $this->eventDispatcher = self::$container->get(EventDispatcherInterface::class); - $this->centerRepository = self::$container->get(CenterRepositoryInterface::class); - $this->personCenterHistory = self::$container->get(PersonCenterHistoryInterface::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); + $this->personMoveManager = self::getContainer()->get(PersonMoveManager::class); + $this->eventDispatcher = self::getContainer()->get(EventDispatcherInterface::class); + $this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $this->personCenterHistory = self::getContainer()->get(PersonCenterHistoryInterface::class); } public static function tearDownAfterClass(): void { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach (self::$entitiesToDelete as [$class, $id]) { $entity = $em->find($class, $id); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php index a23f4ae6e..8d4283b30 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php @@ -51,7 +51,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase public function dataGenerateNewAccompanyingCourse() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $period = new AccompanyingPeriod(new \DateTime('1 week ago')); $user = $em->getRepository(User::class) @@ -99,7 +99,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase $maxResults = $maxGenerated * 8; self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); @@ -166,7 +166,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase $maxResults = $maxGenerated * 8; self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); $qb = $em->createQueryBuilder(); @@ -230,7 +230,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase $maxResults = 100; self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $center = $em->getRepository(Center::class) ->findOneBy(['name' => 'Center A']); $qb = $em->createQueryBuilder(); @@ -433,10 +433,10 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase public function testAccompanyingPeriodPatch(int $personId, int $periodId) { $this->markTestIncomplete('fix test with validation'); - $period = self::$container->get(AccompanyingPeriodRepository::class) + $period = self::getContainer()->get(AccompanyingPeriodRepository::class) ->find($periodId); $initialValueEmergency = $period->isEmergency(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $this->client->request( Request::METHOD_PATCH, @@ -469,7 +469,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase public function testCommentWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId) { $this->markTestIncomplete('fix test with validation'); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $this->client->request( Request::METHOD_POST, @@ -545,7 +545,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase public function testRequestorWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId) { $this->markTestIncomplete('fix test with validation'); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); // post a person $this->client->request( @@ -626,7 +626,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase public function testResourceWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId) { $this->markTestIncomplete('fix test with validation'); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); // post a person $this->client->request( diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php index 7b6bdd43b..0f553162a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php @@ -44,7 +44,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase public function dataGenerateRandomUsers(): \Iterator { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $period = new AccompanyingPeriod(new \DateTime('1 week ago')); $user = $em->getRepository(User::class) @@ -96,7 +96,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase $this->assertEquals(1, \preg_match('|^\\/[^\\/]+\\/parcours/([\\d]+)/edit$|', (string) $location, $matches)); $id = $matches[1]; - $period = self::$container->get(EntityManagerInterface::class) + $period = self::getContainer()->get(EntityManagerInterface::class) ->getRepository(AccompanyingPeriod::class) ->find($id); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php index b5e468032..d01455a96 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php @@ -37,7 +37,7 @@ final class HouseholdApiControllerTest extends WebTestCase { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach ($this->toDelete as [$class, $id]) { $obj = $em->getRepository($class)->find($id); @@ -52,7 +52,7 @@ final class HouseholdApiControllerTest extends WebTestCase public function generateHouseholdAssociatedWithAddressReference() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $centerA = $em->getRepository(Center::class)->findOneBy(['name' => 'Center A']); $nbReference = $em->createQueryBuilder()->select('count(ar)')->from(AddressReference::class, 'ar') ->getQuery()->getSingleScalarResult(); @@ -96,7 +96,7 @@ final class HouseholdApiControllerTest extends WebTestCase { self::bootKernel(); - $qb = self::$container->get(EntityManagerInterface::class) + $qb = self::getContainer()->get(EntityManagerInterface::class) ->createQueryBuilder(); $householdIds = $qb @@ -128,7 +128,7 @@ final class HouseholdApiControllerTest extends WebTestCase { self::bootKernel(); - $qb = self::$container->get(EntityManagerInterface::class) + $qb = self::getContainer()->get(EntityManagerInterface::class) ->createQueryBuilder(); $personIds = $qb diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php index d11f50ac4..25827600b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php @@ -42,7 +42,7 @@ final class HouseholdControllerTest extends WebTestCase public function generateValidHouseholdIds() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $ids = $em->createQuery( sprintf('SELECT DISTINCT h.id FROM %s h JOIN h.members m JOIN m.person p JOIN p.centerHistory ch JOIN ch.center c WHERE c.name = :center AND ch.endDate IS NULL', Household::class) diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php index aaaeefd81..0c7105fc5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php @@ -33,7 +33,7 @@ final class HouseholdMemberControllerTest extends WebTestCase public function provideValidDataEditMember(): \Iterator { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $membershipIds = $em->createQuery(sprintf('SELECT m.id FROM %s m JOIN m.person p JOIN p.centerHistory ch JOIN ch.center c WHERE c.name = :center AND m.endDate IS NULL AND ch.endDate IS NULL', HouseholdMember::class)) ->setParameter('center', 'Center A') @@ -51,7 +51,7 @@ final class HouseholdMemberControllerTest extends WebTestCase public function provideValidDataMove(): \Iterator { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $yesterday = new \DateTimeImmutable('yesterday'); $personIds = $em->createQuery( @@ -79,7 +79,7 @@ final class HouseholdMemberControllerTest extends WebTestCase do { $id = \array_pop($personIds)['id']; - $person = self::$container->get(EntityManagerInterface::class) + $person = self::getContainer()->get(EntityManagerInterface::class) ->getRepository(Person::class) ->find($id); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php index 9171277f7..74b5f3d98 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonApiControllerTest.php @@ -29,7 +29,7 @@ final class PersonApiControllerTest extends WebTestCase public function dataGetPersonFromCenterA(): \Iterator { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $personIds = $em->createQuery(sprintf( 'SELECT p.id FROM %s p JOIN p.centerCurrent pc JOIN pc.center c WHERE c.name = :center', Person::class @@ -52,7 +52,7 @@ final class PersonApiControllerTest extends WebTestCase public function dataGetPersonFromCenterB(): \Iterator { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $personIds = $em->createQuery( sprintf('SELECT p.id FROM %s p JOIN p.centerCurrent pc JOIN pc.center c WHERE c.name = :center', Person::class) ) diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index ed3d44120..9c79c74e0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -47,7 +47,7 @@ final class PersonControllerCreateTest extends WebTestCase public static function tearDownAfterClass(): void { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); // remove two people created during test $jesus = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php index 9bab3f7de..ee2373e11 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php @@ -54,7 +54,7 @@ final class PersonControllerUpdateTest extends WebTestCase { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach (self::$toDelete as [$class, $id]) { $entity = $em->find($class, $id); @@ -124,7 +124,7 @@ final class PersonControllerUpdateTest extends WebTestCase self::assertResponseRedirects($this->makeViewPath($personId)); - $person = self::$container->get(PersonRepository::class)->find($personId); + $person = self::getContainer()->get(PersonRepository::class)->find($personId); self::assertEquals('tagada', $person->getFirstName()); } @@ -156,8 +156,8 @@ final class PersonControllerUpdateTest extends WebTestCase public static function providePerson(): iterable { self::bootKernel(); - $centerRepository = self::$container->get(CenterRepositoryInterface::class); - $em = self::$container->get(EntityManagerInterface::class); + $centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $center = $centerRepository->findOneBy(['name' => 'Center A']); $person = new Person(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php index 8c1a397aa..5a33f88a9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewTest.php @@ -40,7 +40,7 @@ final class PersonControllerViewTest extends WebTestCase { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); foreach (self::$toDelete as [$class, $id]) { $entity = $em->find($class, $id); @@ -95,8 +95,8 @@ final class PersonControllerViewTest extends WebTestCase public static function providePerson(): iterable { self::bootKernel(); - $centerRepository = self::$container->get(CenterRepositoryInterface::class); - $em = self::$container->get(EntityManagerInterface::class); + $centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $center = $centerRepository->findOneBy(['name' => 'Center A']); $person = new Person(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php index 38e482fe9..b425ac71c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonDuplicateControllerViewTest.php @@ -28,9 +28,9 @@ final class PersonDuplicateControllerViewTest extends WebTestCase self::bootKernel(); /** @var EntityManagerInterface $em */ - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); /** @var CenterRepositoryInterface $centerRepository */ - $centerRepository = self::$container->get(CenterRepositoryInterface::class); + $centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); $center = $centerRepository->findOneBy(['name' => 'Center A']); $person = (new Person()) diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php index 626e1469b..d62b4c863 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php @@ -43,7 +43,7 @@ final class RelationshipApiControllerTest extends WebTestCase public function personProvider(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $personIdHavingRelation = $em->createQueryBuilder() ->select('p.id') ->from(Person::class, 'p') @@ -78,7 +78,7 @@ final class RelationshipApiControllerTest extends WebTestCase public function relationProvider(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $personIdWithoutRelations = $em->createQueryBuilder() ->select('p.id') ->from(Person::class, 'p') diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/SocialWorkEvaluationApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/SocialWorkEvaluationApiControllerTest.php index f4609ddc1..85ca7aad1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/SocialWorkEvaluationApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/SocialWorkEvaluationApiControllerTest.php @@ -38,7 +38,7 @@ final class SocialWorkEvaluationApiControllerTest extends WebTestCase self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $evaluation = $em->find(Evaluation::class, $this->evaluationToReset->getId()); $evaluation->setActive(true); @@ -49,7 +49,7 @@ final class SocialWorkEvaluationApiControllerTest extends WebTestCase { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); /** @var SocialAction $socialAction */ $socialAction = $this->em->createQuery( diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php index 0d2684046..2213738e8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php @@ -29,7 +29,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_administrative_location'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_administrative_location'); } public function getAggregator() @@ -48,7 +48,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php index ac7084de7..5338219c8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php @@ -32,8 +32,8 @@ class ClosingDateAggregatorTest extends AbstractAggregatorTest parent::setUpBeforeClass(); self::bootKernel(); - self::$closingDateAggregator = self::$container->get(ClosingDateAggregator::class); - self::$entityManager = self::$container->get(EntityManagerInterface::class); + self::$closingDateAggregator = self::getContainer()->get(ClosingDateAggregator::class); + self::$entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function getAggregator() @@ -51,7 +51,7 @@ class ClosingDateAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { self::bootKernel(); - self::$entityManager = self::$container->get(EntityManagerInterface::class); + self::$entityManager = self::getContainer()->get(EntityManagerInterface::class); $data = [ self::$entityManager->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php index 124b5c03a..00560a7a9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php @@ -29,7 +29,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_closingmotive'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_closingmotive'); } public function getAggregator() @@ -48,7 +48,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php index 796e3cfd1..af759f91c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php @@ -29,7 +29,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_confidential'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_confidential'); } public function getAggregator() @@ -48,7 +48,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php index a13af0293..8a25c131f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php @@ -29,7 +29,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_duration'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_duration'); } public function getAggregator() @@ -50,7 +50,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php index 9e4a14862..04815b5ea 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php @@ -29,7 +29,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_emergency'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_emergency'); } public function getAggregator() @@ -48,7 +48,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php index 70a76b2fb..3ba43fe99 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php @@ -29,7 +29,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_evaluation'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluation'); } public function getAggregator() @@ -48,7 +48,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php index bd5dc5e87..5c41abf8d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php @@ -31,7 +31,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_geographicalunitstat'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_geographicalunitstat'); } public function getAggregator() @@ -42,7 +42,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest public function getFormData(): array { self::bootKernel(); - $repository = self::$container->get(GeographicalUnitLayerLayerRepository::class); + $repository = self::getContainer()->get(GeographicalUnitLayerLayerRepository::class); $levels = $repository->findAll(); return [ @@ -56,7 +56,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest self::bootKernel(); } - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php index 769c6fa8a..013b5fe0e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php @@ -29,7 +29,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_intensity'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_intensity'); } public function getAggregator() @@ -48,7 +48,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php index 77d26b278..00bb16675 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php @@ -32,8 +32,8 @@ class OpeningDateAggregatorTest extends AbstractAggregatorTest parent::setUpBeforeClass(); self::bootKernel(); - self::$openingDateAggregator = self::$container->get(OpeningDateAggregator::class); - self::$entityManager = self::$container->get(EntityManagerInterface::class); + self::$openingDateAggregator = self::getContainer()->get(OpeningDateAggregator::class); + self::$entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function getAggregator() @@ -51,7 +51,7 @@ class OpeningDateAggregatorTest extends AbstractAggregatorTest public function getQueryBuilders() { self::bootKernel(); - self::$entityManager = self::$container->get(EntityManagerInterface::class); + self::$entityManager = self::getContainer()->get(EntityManagerInterface::class); $data = [ self::$entityManager->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php index 1f3149c65..38ae61a85 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php @@ -29,7 +29,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_origin'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_origin'); } public function getAggregator() @@ -48,7 +48,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php index 8951b61eb..1b35cc38f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregatorTest.php @@ -30,7 +30,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_referrer'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer'); } public function getAggregator() @@ -49,7 +49,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php index 539b856ec..85d75aa63 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php @@ -65,7 +65,7 @@ final class ReferrerScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php index 298c3b020..576050a9a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php @@ -29,7 +29,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_requestor'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_requestor'); } public function getAggregator() @@ -48,7 +48,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php index 833cca235..064d046e4 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php @@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_referrer_scope'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_scope'); } public function getAggregator() @@ -48,7 +48,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php index b4ea4ec02..ca2db8d89 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php @@ -29,7 +29,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_socialaction'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialaction'); } public function getAggregator() @@ -48,7 +48,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php index 9135b7d9c..86dc9bf48 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php @@ -29,7 +29,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_socialissue'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialissue'); } public function getAggregator() @@ -48,7 +48,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php index dee46e80a..11c0acc3b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php @@ -30,7 +30,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_step'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_step'); } public function getAggregator() @@ -51,7 +51,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php index a62886152..ab459297a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregatorTest.php @@ -30,7 +30,7 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_referrer_job'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_job'); } public function getAggregator() @@ -51,7 +51,7 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php index 98d7bf581..15c458409 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php @@ -29,7 +29,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_evaluationtype'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluationtype'); } public function getAggregator() @@ -48,7 +48,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php index 6e77e0ee9..88b1510c9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php @@ -30,7 +30,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_household_childrennumber'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_childrennumber'); } public function getAggregator() @@ -51,7 +51,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php index 312ad86dc..afc9c564d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php @@ -30,7 +30,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_household_composition'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_composition'); } public function getAggregator() @@ -51,7 +51,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php index ce687655f..12a1e3e99 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php @@ -30,7 +30,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_age'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_age'); } public function getAggregator() @@ -51,7 +51,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php index e7ed46563..949e821e9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php @@ -29,7 +29,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_country_of_birth'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_country_of_birth'); } public function getAggregator() @@ -49,7 +49,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php index eaafa5ee2..ed67fd2df 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php @@ -29,7 +29,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_gender'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_gender'); } public function getAggregator() @@ -48,7 +48,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php index 157d3ad08..91d196594 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php @@ -32,7 +32,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_household_position'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_position'); } public function getAggregator() @@ -53,7 +53,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php index 00726199c..7f407ae9e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php @@ -29,7 +29,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_marital_status'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_marital_status'); } public function getAggregator() @@ -48,7 +48,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php index 3179b12e7..8822ece6c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php @@ -29,7 +29,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_nationality'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_nationality'); } public function getAggregator() @@ -49,7 +49,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php index 445f257b8..53202abe1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php @@ -30,7 +30,7 @@ class PostalCodeAggregatorTest extends AbstractAggregatorTest protected function setUp(): void { self::bootKernel(); - $this->rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); + $this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); } public function getAggregator() @@ -49,7 +49,7 @@ class PostalCodeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php index 84be8b8b3..1cd012c70 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php @@ -29,7 +29,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_action_type'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_action_type'); } public function getAggregator() @@ -48,7 +48,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php index 18921db7b..b850244c0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php @@ -29,7 +29,7 @@ class CreatorAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(CreatorAggregator::class); + $this->aggregator = self::getContainer()->get(CreatorAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ class CreatorAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php index 98699db0e..6fce8d706 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php @@ -29,7 +29,7 @@ class CreatorJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(CreatorJobAggregator::class); + $this->aggregator = self::getContainer()->get(CreatorJobAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ class CreatorJobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php index df424792c..8e8d9276f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php @@ -29,7 +29,7 @@ class CreatorScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(CreatorScopeAggregator::class); + $this->aggregator = self::getContainer()->get(CreatorScopeAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ class CreatorScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php index 0c439d534..6061a511c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php @@ -29,7 +29,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_goal'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goal'); } public function getAggregator() @@ -48,7 +48,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php index e34f665e9..60abafb49 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php @@ -29,7 +29,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_goalresult'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goalresult'); } public function getAggregator() @@ -48,7 +48,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php index 3677cedf2..b4101261b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php @@ -29,7 +29,7 @@ class HandlingThirdPartyAggregatorTest extends AbstractAggregatorTest { parent::setUpBeforeClass(); self::bootKernel(); - self::$handlingThirdPartyAggregator = self::$container->get(HandlingThirdPartyAggregator::class); + self::$handlingThirdPartyAggregator = self::getContainer()->get(HandlingThirdPartyAggregator::class); } public function getAggregator() @@ -48,7 +48,7 @@ class HandlingThirdPartyAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php index 1cdc27daf..b885c3177 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php @@ -29,7 +29,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_treatingagent_job'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_job'); } public function getAggregator() @@ -48,7 +48,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php index 928ce33fc..2882c79f0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php @@ -30,7 +30,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get(ReferrerAggregator::class); + $this->aggregator = self::getContainer()->get(ReferrerAggregator::class); } public function getAggregator() @@ -52,7 +52,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php index effbd4f18..1960027b4 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php @@ -29,7 +29,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_result'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_result'); } public function getAggregator() @@ -48,7 +48,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php index 1c5b462cd..54d01528a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php @@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $this->aggregator = self::$container->get('chill.person.export.aggregator_treatingagent_scope'); + $this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_scope'); } public function getAggregator() @@ -48,7 +48,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriodTest.php index c45aafdfa..37357aa0a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriodTest.php @@ -30,7 +30,7 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriodTest extends Abstract public function getExport() { - $repository = self::$container->get(AccompanyingPeriodWorkRepository::class); + $repository = self::getContainer()->get(AccompanyingPeriodWorkRepository::class); yield new AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod($this->getParameters(true), $repository); yield new AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod($this->getParameters(false), $repository); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnWorkTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnWorkTest.php index 3ef3b28da..5666747b0 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnWorkTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/AvgDurationAPWorkPersonAssociatedOnWorkTest.php @@ -30,7 +30,7 @@ class AvgDurationAPWorkPersonAssociatedOnWorkTest extends AbstractExportTest public function getExport() { - $repository = self::$container->get(AccompanyingPeriodWorkRepository::class); + $repository = self::getContainer()->get(AccompanyingPeriodWorkRepository::class); yield new AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod($this->getParameters(true), $repository); yield new AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod($this->getParameters(false), $repository); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php index 88803e508..57eb8a4b5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseTest.php @@ -30,7 +30,7 @@ final class CountAccompanyingCourseTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountAccompanyingCourse($em, $this->getParameters(true)); yield new CountAccompanyingCourse($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php index 5caabf351..fce135e2d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php @@ -30,7 +30,7 @@ final class CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest e public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod($em, $this->getParameters(true)); yield new CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php index 6b6e7b7b4..e974656d9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php @@ -30,7 +30,7 @@ final class CountAccompanyingPeriodWorkAssociatePersonOnWorkTest extends Abstrac public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(true)); yield new CountAccompanyingPeriodWorkAssociatePersonOnwork($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountHouseholdInPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountHouseholdInPeriodTest.php index b29c9a1f9..45f1da9c5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountHouseholdInPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountHouseholdInPeriodTest.php @@ -32,8 +32,8 @@ class CountHouseholdInPeriodTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); - $rollingDate = self::$container->get(RollingDateConverterInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $rollingDate = self::getContainer()->get(RollingDateConverterInterface::class); yield new CountHouseholdInPeriod($em, $rollingDate, $this->getParameters(true)); yield new CountHouseholdInPeriod($em, $rollingDate, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWorkTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWorkTest.php index 04d2debe5..242346ab5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWorkTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWorkTest.php @@ -30,7 +30,7 @@ class CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWorkTest extends Abstr public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(true)); yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php index 758b4d11f..3e4c58897 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonTest.php @@ -31,7 +31,7 @@ final class CountPersonTest extends AbstractExportTest public function getExport() { - $personRepository = self::$container->get(PersonRepository::class); + $personRepository = self::getContainer()->get(PersonRepository::class); yield new CountPerson($personRepository, $this->getParameters(true)); yield new CountPerson($personRepository, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonWithAccompanyingCourseTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonWithAccompanyingCourseTest.php index 128bf271d..d50640089 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonWithAccompanyingCourseTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountPersonWithAccompanyingCourseTest.php @@ -30,7 +30,7 @@ class CountPersonWithAccompanyingCourseTest extends AbstractExportTest public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield new CountPersonWithAccompanyingCourse($em, $this->getParameters(true)); yield new CountPersonWithAccompanyingCourse($em, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodTest.php index d341288b6..dcf916252 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodTest.php @@ -51,11 +51,11 @@ class ListAccompanyingPeriodTest extends AbstractExportTest public function getExport() { /** @var EntityManagerInterface::class $em */ - $em = self::$container->get(EntityManagerInterface::class); - $rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); - $listAccompanyingPeriodHelper = self::$container->get(ListAccompanyingPeriodHelper::class); - $centerRepository = self::$container->get(CenterRepositoryInterface::class); - $scopeRepository = self::$container->get(ScopeRepositoryInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); + $listAccompanyingPeriodHelper = self::getContainer()->get(ListAccompanyingPeriodHelper::class); + $centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $scopeRepository = self::getContainer()->get(ScopeRepositoryInterface::class); // mock security $user = $em->createQuery('SELECT u FROM '.User::class.' u') diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php index 22081b65a..b1d7830fa 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest.php @@ -47,18 +47,18 @@ class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriodTest extends public function getExport() { - $entityManager = self::$container->get(EntityManagerInterface::class); - $dateTimeHelper = self::$container->get(DateTimeHelper::class); - $userHelper = self::$container->get(UserHelper::class); - $personHelper = self::$container->get(LabelPersonHelper::class); - $thirdPartyHelper = self::$container->get(LabelThirdPartyHelper::class); - $translatableStringExportLabelHelper = self::$container->get(TranslatableStringExportLabelHelper::class); - $socialIssueRender = self::$container->get(SocialIssueRender::class); - $socialIssueRepository = self::$container->get(SocialIssueRepository::class); - $socialActionRender = self::$container->get(SocialActionRender::class); - $rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); - $aggregateStringHelper = self::$container->get(AggregateStringHelper::class); - $socialActionRepository = self::$container->get(SocialActionRepository::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $dateTimeHelper = self::getContainer()->get(DateTimeHelper::class); + $userHelper = self::getContainer()->get(UserHelper::class); + $personHelper = self::getContainer()->get(LabelPersonHelper::class); + $thirdPartyHelper = self::getContainer()->get(LabelThirdPartyHelper::class); + $translatableStringExportLabelHelper = self::getContainer()->get(TranslatableStringExportLabelHelper::class); + $socialIssueRender = self::getContainer()->get(SocialIssueRender::class); + $socialIssueRepository = self::getContainer()->get(SocialIssueRepository::class); + $socialActionRender = self::getContainer()->get(SocialActionRender::class); + $rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); + $aggregateStringHelper = self::getContainer()->get(AggregateStringHelper::class); + $socialActionRepository = self::getContainer()->get(SocialActionRepository::class); $filterListAccompanyingPeriodHelper = $this->prophesize(FilterListAccompanyingPeriodHelperInterface::class); yield new ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod( diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWorkTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWorkTest.php index 7c55e5f3c..118347282 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWorkTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWorkTest.php @@ -47,18 +47,18 @@ class ListAccompanyingPeriodWorkAssociatePersonOnWorkTest extends AbstractExport public function getExport() { - $entityManager = self::$container->get(EntityManagerInterface::class); - $dateTimeHelper = self::$container->get(DateTimeHelper::class); - $userHelper = self::$container->get(UserHelper::class); - $personHelper = self::$container->get(LabelPersonHelper::class); - $thirdPartyHelper = self::$container->get(LabelThirdPartyHelper::class); - $translatableStringExportLabelHelper = self::$container->get(TranslatableStringExportLabelHelper::class); - $socialIssueRender = self::$container->get(SocialIssueRender::class); - $socialIssueRepository = self::$container->get(SocialIssueRepository::class); - $socialActionRender = self::$container->get(SocialActionRender::class); - $rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); - $aggregateStringHelper = self::$container->get(AggregateStringHelper::class); - $socialActionRepository = self::$container->get(SocialActionRepository::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $dateTimeHelper = self::getContainer()->get(DateTimeHelper::class); + $userHelper = self::getContainer()->get(UserHelper::class); + $personHelper = self::getContainer()->get(LabelPersonHelper::class); + $thirdPartyHelper = self::getContainer()->get(LabelThirdPartyHelper::class); + $translatableStringExportLabelHelper = self::getContainer()->get(TranslatableStringExportLabelHelper::class); + $socialIssueRender = self::getContainer()->get(SocialIssueRender::class); + $socialIssueRepository = self::getContainer()->get(SocialIssueRepository::class); + $socialActionRender = self::getContainer()->get(SocialActionRender::class); + $rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); + $aggregateStringHelper = self::getContainer()->get(AggregateStringHelper::class); + $socialActionRepository = self::getContainer()->get(SocialActionRepository::class); $filterHelper = $this->prophesize(FilterListAccompanyingPeriodHelperInterface::class); yield new ListAccompanyingPeriodWorkAssociatePersonOnWork( diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListEvaluationTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListEvaluationTest.php index fde50ea6c..116c072ef 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListEvaluationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListEvaluationTest.php @@ -46,22 +46,22 @@ class ListEvaluationTest extends AbstractExportTest parent::setUp(); self::bootKernel(); - $this->centerRepository = self::$container->get(CenterRepositoryInterface::class); + $this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); } public function getExport() { - $entityManager = self::$container->get(EntityManagerInterface::class); - $dateTimeHelper = self::$container->get(DateTimeHelper::class); - $userHelper = self::$container->get(UserHelper::class); - $personHelper = self::$container->get(LabelPersonHelper::class); - $translatableStringExportLabelHelper = self::$container->get(TranslatableStringExportLabelHelper::class); - $socialIssueRender = self::$container->get(SocialIssueRender::class); - $socialIssueRepository = self::$container->get(SocialIssueRepository::class); - $socialActionRender = self::$container->get(SocialActionRender::class); - $rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); - $aggregateStringHelper = self::$container->get(AggregateStringHelper::class); - $socialActionRepository = self::$container->get(SocialActionRepository::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $dateTimeHelper = self::getContainer()->get(DateTimeHelper::class); + $userHelper = self::getContainer()->get(UserHelper::class); + $personHelper = self::getContainer()->get(LabelPersonHelper::class); + $translatableStringExportLabelHelper = self::getContainer()->get(TranslatableStringExportLabelHelper::class); + $socialIssueRender = self::getContainer()->get(SocialIssueRender::class); + $socialIssueRepository = self::getContainer()->get(SocialIssueRepository::class); + $socialActionRender = self::getContainer()->get(SocialActionRender::class); + $rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); + $aggregateStringHelper = self::getContainer()->get(AggregateStringHelper::class); + $socialActionRepository = self::getContainer()->get(SocialActionRepository::class); $filterListHelper = $this->prophesize(FilterListAccompanyingPeriodHelperInterface::class); yield new ListEvaluation( diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListHouseholdInPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListHouseholdInPeriodTest.php index 929fdc829..a1b78e5e9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListHouseholdInPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListHouseholdInPeriodTest.php @@ -35,11 +35,11 @@ class ListHouseholdInPeriodTest extends AbstractExportTest public function getExport() { - $addressHelper = self::$container->get(ExportAddressHelper::class); - $aggregateStringHelper = self::$container->get(AggregateStringHelper::class); - $entityManager = self::$container->get(EntityManagerInterface::class); - $rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); - $translatableStringHelper = self::$container->get(TranslatableStringExportLabelHelper::class); + $addressHelper = self::getContainer()->get(ExportAddressHelper::class); + $aggregateStringHelper = self::getContainer()->get(AggregateStringHelper::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringExportLabelHelper::class); yield new ListHouseholdInPeriod( $addressHelper, diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonHavingAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonHavingAccompanyingPeriodTest.php index c050779e2..98bc70ae1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonHavingAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonHavingAccompanyingPeriodTest.php @@ -35,10 +35,10 @@ class ListPersonHavingAccompanyingPeriodTest extends AbstractExportTest public function getExport() { - $addressHelper = self::$container->get(ExportAddressHelper::class); - $listPersonHelper = self::$container->get(ListPersonHelper::class); - $entityManager = self::$container->get(EntityManagerInterface::class); - $rollingDateconverter = self::$container->get(RollingDateConverterInterface::class); + $addressHelper = self::getContainer()->get(ExportAddressHelper::class); + $listPersonHelper = self::getContainer()->get(ListPersonHelper::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $rollingDateconverter = self::getContainer()->get(RollingDateConverterInterface::class); yield new ListPersonHavingAccompanyingPeriod( $addressHelper, diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php index b398d1c91..a89a28c5f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonTest.php @@ -37,24 +37,24 @@ final class ListPersonTest extends AbstractExportTest { self::bootKernel(); - $this->export = self::$container->get(ListPerson::class); + $this->export = self::getContainer()->get(ListPerson::class); $request = $this->prophesize() ->willExtend(\Symfony\Component\HttpFoundation\Request::class); $request->getLocale()->willReturn('fr'); - self::$container->get('request_stack') + self::getContainer()->get('request_stack') ->push($request->reveal()); } public function getExport() { - $addressHelper = self::$container->get(ExportAddressHelper::class); - $customFieldProvider = self::$container->get(CustomFieldProvider::class); - $listPersonHelper = self::$container->get(ListPersonHelper::class); - $entityManager = self::$container->get(EntityManagerInterface::class); - $translatableStringHelper = self::$container->get(TranslatableStringHelper::class); + $addressHelper = self::getContainer()->get(ExportAddressHelper::class); + $customFieldProvider = self::getContainer()->get(CustomFieldProvider::class); + $listPersonHelper = self::getContainer()->get(ListPersonHelper::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $translatableStringHelper = self::getContainer()->get(TranslatableStringHelper::class); yield new ListPerson( $addressHelper, diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonWithAccompanyingPeriodDetailsTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonWithAccompanyingPeriodDetailsTest.php index 0d3200b75..cc5605edb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonWithAccompanyingPeriodDetailsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/ListPersonWithAccompanyingPeriodDetailsTest.php @@ -39,10 +39,10 @@ class ListPersonWithAccompanyingPeriodDetailsTest extends AbstractExportTest public function getExport() { - $listPersonHelper = self::$container->get(ListPersonHelper::class); - $listAccompanyingPeriodHelper = self::$container->get(ListAccompanyingPeriodHelper::class); - $entityManager = self::$container->get(EntityManagerInterface::class); - $rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); + $listPersonHelper = self::getContainer()->get(ListPersonHelper::class); + $listAccompanyingPeriodHelper = self::getContainer()->get(ListAccompanyingPeriodHelper::class); + $entityManager = self::getContainer()->get(EntityManagerInterface::class); + $rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class); $filterHelper = $this->prophesize(FilterListAccompanyingPeriodHelperInterface::class); yield new ListPersonWithAccompanyingPeriodDetails( diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php index bf06466c6..436061c97 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/StatAccompanyingCourseDurationTest.php @@ -31,13 +31,13 @@ final class StatAccompanyingCourseDurationTest extends AbstractExportTest { self::bootKernel(); - $this->export = self::$container->get('chill.person.export.avg_accompanyingcourse_duration'); + $this->export = self::getContainer()->get('chill.person.export.avg_accompanyingcourse_duration'); } public function getExport() { - $em = self::$container->get(EntityManagerInterface::class); - $rollingDateconverter = self::$container->get(RollingDateConverterInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $rollingDateconverter = self::getContainer()->get(RollingDateConverterInterface::class); yield new StatAccompanyingCourseDuration($em, $rollingDateconverter, $this->getParameters(true)); yield new StatAccompanyingCourseDuration($em, $rollingDateconverter, $this->getParameters(false)); diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php index e88c22d7a..8927cf858 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php @@ -30,7 +30,7 @@ final class ActiveOnDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_activeondate'); + $this->filter = self::getContainer()->get('chill.person.export.filter_activeondate'); } public function getFilter() @@ -51,7 +51,7 @@ final class ActiveOnDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php index 459ccb775..e08b2d4aa 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php @@ -30,7 +30,7 @@ final class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_activeonedaybetweendates'); + $this->filter = self::getContainer()->get('chill.person.export.filter_activeonedaybetweendates'); } public function getFilter() @@ -52,7 +52,7 @@ final class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php index 22981759c..c6eb04e05 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php @@ -29,7 +29,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_administrative_location'); + $this->filter = self::getContainer()->get('chill.person.export.filter_administrative_location'); } public function getFilter() @@ -40,7 +40,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(Location::class, 'l') @@ -62,7 +62,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php index 9e4d98f17..bf3384fcc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php @@ -30,7 +30,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_closingmotive'); + $this->filter = self::getContainer()->get('chill.person.export.filter_closingmotive'); } public function getFilter() @@ -41,7 +41,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(ClosingMotive::class, 'm') @@ -62,7 +62,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php index a0f1ec6a9..38c703cff 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php @@ -28,7 +28,7 @@ final class ConfidentialFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_confidential'); + $this->filter = self::getContainer()->get('chill.person.export.filter_confidential'); } public function getFilter() @@ -48,7 +48,7 @@ final class ConfidentialFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php index ddf88bf8c..3f6fa8e4d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php @@ -28,7 +28,7 @@ final class EmergencyFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_emergency'); + $this->filter = self::getContainer()->get('chill.person.export.filter_emergency'); } public function getFilter() @@ -48,7 +48,7 @@ final class EmergencyFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php index f300ad7b4..de6305759 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php @@ -29,7 +29,7 @@ final class EvaluationFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_evaluation'); + $this->filter = self::getContainer()->get('chill.person.export.filter_evaluation'); } public function getFilter() @@ -40,7 +40,7 @@ final class EvaluationFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(Evaluation::class, 'ev') @@ -62,7 +62,7 @@ final class EvaluationFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php index 540cb6c7a..1d3f271af 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php @@ -31,7 +31,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_geographicalunitstat'); + $this->filter = self::getContainer()->get('chill.person.export.filter_geographicalunitstat'); } public function getFilter() @@ -42,7 +42,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $repo = self::$container->get(GeographicalUnitRepositoryInterface::class); + $repo = self::getContainer()->get(GeographicalUnitRepositoryInterface::class); $units = $repo->findAll(); @@ -58,7 +58,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php index 149e94e57..8320345d1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php @@ -29,7 +29,7 @@ final class IntensityFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_intensity'); + $this->filter = self::getContainer()->get('chill.person.export.filter_intensity'); } public function getFilter() @@ -49,7 +49,7 @@ final class IntensityFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php index 0ebded633..33620ff6e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php @@ -30,7 +30,7 @@ final class OpenBetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_openbetweendates'); + $this->filter = self::getContainer()->get('chill.person.export.filter_openbetweendates'); } public function getFilter() @@ -52,7 +52,7 @@ final class OpenBetweenDatesFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php index 5a5689f3f..82c368f11 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php @@ -30,7 +30,7 @@ final class OriginFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_origin'); + $this->filter = self::getContainer()->get('chill.person.export.filter_origin'); } public function getFilter() @@ -41,7 +41,7 @@ final class OriginFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(Origin::class, 'o') @@ -63,7 +63,7 @@ final class OriginFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php index a56741bd3..10df0daca 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php @@ -31,7 +31,7 @@ final class ReferrerFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_referrer'); + $this->filter = self::getContainer()->get('chill.person.export.filter_referrer'); } public function getFilter() @@ -42,7 +42,7 @@ final class ReferrerFilterTest extends AbstractFilterTest public function getFormData(): array { self:self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(User::class, 'u') @@ -64,7 +64,7 @@ final class ReferrerFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); yield $em->createQueryBuilder() ->from(AccompanyingPeriod::class, 'acp') diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php index 1fe454c47..6fb3b5291 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php @@ -29,7 +29,7 @@ final class RequestorFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_requestor'); + $this->filter = self::getContainer()->get('chill.person.export.filter_requestor'); } public function getFilter() @@ -51,7 +51,7 @@ final class RequestorFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php index 65078dad2..4190c8e1b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php @@ -31,7 +31,7 @@ final class SocialActionFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_socialaction'); + $this->filter = self::getContainer()->get('chill.person.export.filter_socialaction'); } public function getFilter() @@ -42,7 +42,7 @@ final class SocialActionFilterTest extends AbstractFilterTest public function getFormData(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(SocialAction::class, 'sa') @@ -87,7 +87,7 @@ final class SocialActionFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php index 37d8ca8db..f433e7987 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php @@ -31,7 +31,7 @@ final class SocialIssueFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_socialissue'); + $this->filter = self::getContainer()->get('chill.person.export.filter_socialissue'); } public function getFilter() @@ -42,7 +42,7 @@ final class SocialIssueFilterTest extends AbstractFilterTest public function getFormData(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(SocialIssue::class, 'si') @@ -59,7 +59,7 @@ final class SocialIssueFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php index 6410c4094..34cafd926 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php @@ -30,7 +30,7 @@ final class StepFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(StepFilterOnDate::class); + $this->filter = self::getContainer()->get(StepFilterOnDate::class); } public function getFilter() @@ -55,7 +55,7 @@ final class StepFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php index 560fe26a7..6ac7da376 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php @@ -32,7 +32,7 @@ final class UserJobFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(UserJobFilter::class); + $this->filter = self::getContainer()->get(UserJobFilter::class); } public function getFilter() @@ -43,7 +43,7 @@ final class UserJobFilterTest extends AbstractFilterTest public function getFormData(): iterable { self::bootKernel(); - $jobs = self::$container->get(EntityManagerInterface::class) + $jobs = self::getContainer()->get(EntityManagerInterface::class) ->createQuery('SELECT j FROM '.UserJob::class.' j') ->setMaxResults(1) ->getResult(); @@ -63,7 +63,7 @@ final class UserJobFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php index ec98f1bfd..844622623 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php @@ -32,7 +32,7 @@ final class UserScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(UserScopeFilter::class); + $this->filter = self::getContainer()->get(UserScopeFilter::class); } public function getFilter() @@ -43,7 +43,7 @@ final class UserScopeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $scopes = self::$container->get(EntityManagerInterface::class) + $scopes = self::getContainer()->get(EntityManagerInterface::class) ->createQuery('SELECT s FROM '.Scope::class.' s') ->setMaxResults(1) ->getResult(); @@ -64,7 +64,7 @@ final class UserScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php index 601b67cdb..591069949 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php @@ -30,7 +30,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_evaluationtype'); + $this->filter = self::getContainer()->get('chill.person.export.filter_evaluationtype'); } public function getFilter() @@ -41,7 +41,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(Evaluation::class, 'e') @@ -65,7 +65,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php index db1c29ab6..a2cf0f566 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php @@ -29,7 +29,7 @@ final class MaxDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_maxdate'); + $this->filter = self::getContainer()->get('chill.person.export.filter_maxdate'); } public function getFilter() @@ -49,7 +49,7 @@ final class MaxDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php index 471dde032..a6b55cca6 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/HouseholdFilters/CompositionFilterTest.php @@ -31,7 +31,7 @@ final class CompositionFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_household_composition'); + $this->filter = self::getContainer()->get('chill.person.export.filter_household_composition'); } public function getFilter(): CompositionFilter @@ -42,7 +42,7 @@ final class CompositionFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(HouseholdCompositionType::class, 'r') @@ -67,7 +67,7 @@ final class CompositionFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $qb = $em->createQueryBuilder(); $qb ->from(Household::class, 'household') diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php index ca04a40a4..4c7a3d681 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php @@ -30,7 +30,7 @@ final class AgeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_age'); + $this->filter = self::getContainer()->get('chill.person.export.filter_age'); } public function getFilter() @@ -53,7 +53,7 @@ final class AgeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php index ee5e167be..256f6e0a8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php @@ -30,7 +30,7 @@ final class BirthdateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_birthdate'); + $this->filter = self::getContainer()->get('chill.person.export.filter_birthdate'); } public function getFilter() @@ -52,7 +52,7 @@ final class BirthdateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php index 7c67cd6d2..186edc335 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php @@ -30,7 +30,7 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_dead_or_alive'); + $this->filter = self::getContainer()->get('chill.person.export.filter_dead_or_alive'); } public function getFilter() @@ -56,7 +56,7 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php index 9062bfc2a..e196c33f2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php @@ -30,7 +30,7 @@ final class DeathdateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_deathdate'); + $this->filter = self::getContainer()->get('chill.person.export.filter_deathdate'); } public function getFilter() @@ -52,7 +52,7 @@ final class DeathdateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php index 2aac73fe6..d31969b5f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php @@ -29,7 +29,7 @@ final class GenderFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_gender'); + $this->filter = self::getContainer()->get('chill.person.export.filter_gender'); } public function getFilter() @@ -56,7 +56,7 @@ final class GenderFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container + $em = self::getContainer() ->get(EntityManagerInterface::class); return [ diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php index c52bb98cd..fdd11732e 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php @@ -30,7 +30,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_marital_status'); + $this->filter = self::getContainer()->get('chill.person.export.filter_marital_status'); } public function getFilter() @@ -41,7 +41,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(MaritalStatus::class, 'm') @@ -65,7 +65,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php index 973b8c6eb..e04b3ce90 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php @@ -30,7 +30,7 @@ final class NationalityFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_nationality'); + $this->filter = self::getContainer()->get('chill.person.export.filter_nationality'); } public function getFilter() @@ -41,7 +41,7 @@ final class NationalityFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $countries = array_slice($em->getRepository(Country::class)->findAll(), 0, 1); @@ -60,7 +60,7 @@ final class NationalityFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php index c5f387463..32ba578a5 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php @@ -33,7 +33,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_residential_address_at_thirdparty'); + $this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_thirdparty'); } public function getFilter() @@ -44,7 +44,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $array = $em->createQueryBuilder() ->from(ThirdPartyCategory::class, 'tpc') @@ -69,7 +69,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php index d0e42b9c3..2effbd835 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php @@ -31,7 +31,7 @@ final class ResidentialAddressAtUserFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_residential_address_at_user'); + $this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_user'); } public function getFilter() @@ -50,7 +50,7 @@ final class ResidentialAddressAtUserFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php index a8ba33350..e3126b8a2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php @@ -30,7 +30,7 @@ class CreatorFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(CreatorFilter::class); + $this->filter = self::getContainer()->get(CreatorFilter::class); } public function getFilter() @@ -42,7 +42,7 @@ class CreatorFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $creators = $em->createQuery('SELECT u FROM '.User::class.' u') ->setMaxResults(1) @@ -59,7 +59,7 @@ class CreatorFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php index 51a4a288e..bef52826a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php @@ -31,7 +31,7 @@ class CreatorJobFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(CreatorJobFilter::class); + $this->filter = self::getContainer()->get(CreatorJobFilter::class); } public function getFilter() @@ -42,7 +42,7 @@ class CreatorJobFilterTest extends AbstractFilterTest public function getFormData() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $jobs = $em->createQuery('SELECT j FROM '.UserJob::class.' j') ->setMaxResults(1) @@ -59,7 +59,7 @@ class CreatorJobFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php index cac5856bd..a158eac31 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php @@ -30,7 +30,7 @@ class CreatorScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(CreatorScopeFilter::class); + $this->filter = self::getContainer()->get(CreatorScopeFilter::class); } public function getFilter() @@ -41,7 +41,7 @@ class CreatorScopeFilterTest extends AbstractFilterTest public function getFormData() { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $scopes = $em->createQuery('SELECT s FROM '.Scope::class.' s') ->setMaxResults(1) @@ -58,7 +58,7 @@ class CreatorScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php index e454a10fc..c2585cc24 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php @@ -31,7 +31,7 @@ class HandlingThirdPartyFilterTest extends AbstractFilterTest { parent::setUp(); self::bootKernel(); - $this->thirdPartyRender = self::$container->get(ThirdPartyRender::class); + $this->thirdPartyRender = self::getContainer()->get(ThirdPartyRender::class); } public function getFilter() @@ -43,7 +43,7 @@ class HandlingThirdPartyFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $thirdParties = $em->createQuery('SELECT tp FROM '.ThirdParty::class.' tp') ->setMaxResults(2) @@ -60,7 +60,7 @@ class HandlingThirdPartyFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php index 392ec656b..be490bf63 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php @@ -31,7 +31,7 @@ final class JobFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_job'); + $this->filter = self::getContainer()->get('chill.person.export.filter_job'); } public function getFilter() @@ -42,7 +42,7 @@ final class JobFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $jobs = $em->createQuery('SELECT j FROM '.UserJob::class.' j') ->setMaxResults(1) @@ -59,7 +59,7 @@ final class JobFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php index 5459fdd18..8ed86da97 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php @@ -31,7 +31,7 @@ final class ReferrerFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_treatingagent'); + $this->filter = self::getContainer()->get('chill.person.export.filter_treatingagent'); } public function getFilter() @@ -42,7 +42,7 @@ final class ReferrerFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $users = array_slice($em->getRepository(User::class)->findAll(), 0, 1); @@ -66,7 +66,7 @@ final class ReferrerFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php index 78051e0da..77b8db28b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php @@ -30,7 +30,7 @@ final class ScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_scope'); + $this->filter = self::getContainer()->get('chill.person.export.filter_scope'); } public function getFilter() @@ -41,7 +41,7 @@ final class ScopeFilterTest extends AbstractFilterTest public function getFormData(): array { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $scopes = $em->createQuery('SELECT s FROM '.Scope::class.' s') ->setMaxResults(1) @@ -58,7 +58,7 @@ final class ScopeFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php index 618063ede..ee4e7bdfe 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Helper/FilterListAccompanyingPeriodHelperTest.php @@ -47,9 +47,9 @@ final class FilterListAccompanyingPeriodHelperTest extends KernelTestCase parent::setUp(); self::bootKernel(); - $this->centerRepository = self::$container->get(CenterRepositoryInterface::class); - $this->scopeRepository = self::$container->get(ScopeRepositoryInterface::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $this->scopeRepository = self::getContainer()->get(ScopeRepositoryInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php index 88ee709f2..4b879149c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php @@ -36,14 +36,14 @@ final class PickPersonTypeTest extends KernelTestCase { self::bootKernel(); - $this->user = self::$container->get('doctrine.orm.entity_manager') + $this->user = self::getContainer()->get('doctrine.orm.entity_manager') ->getRepository(\Chill\MainBundle\Entity\User::class) ->findOneBy(['username' => 'multi_center']); - $this->formFactory = self::$container->get('form.factory'); + $this->formFactory = self::getContainer()->get('form.factory'); $token = (new UsernamePasswordToken($this->user, 'password', 'firewall')); - self::$container->get('security.token_storage') + self::getContainer()->get('security.token_storage') ->setToken($token); } @@ -69,7 +69,7 @@ final class PickPersonTypeTest extends KernelTestCase public function testWithOptionCenter() { $this->markTestSkipped('need to inject locale into url generator without request'); - $center = self::$container->get('doctrine.orm.entity_manager') + $center = self::getContainer()->get('doctrine.orm.entity_manager') ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findOneBy(['name' => 'Center A']); @@ -102,7 +102,7 @@ final class PickPersonTypeTest extends KernelTestCase public function testWithOptionCenters() { $this->markTestSkipped('need to inject locale into url generator without request'); - $centers = self::$container->get('doctrine.orm.entity_manager') + $centers = self::getContainer()->get('doctrine.orm.entity_manager') ->getRepository(\Chill\MainBundle\Entity\Center::class) ->findAll(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php index 87c57be86..8cec983e3 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php @@ -61,19 +61,19 @@ class AccompanyingPeriodACLAwareRepositoryTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->accompanyingPeriodRepository = self::$container->get(AccompanyingPeriodRepository::class); - $this->centerRepository = self::$container->get(CenterRepositoryInterface::class); - $this->centerResolverManager = self::$container->get(CenterResolverManagerInterface::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->scopeRepository = self::$container->get(ScopeRepositoryInterface::class); - $this->registry = self::$container->get(Registry::class); + $this->accompanyingPeriodRepository = self::getContainer()->get(AccompanyingPeriodRepository::class); + $this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $this->centerResolverManager = self::getContainer()->get(CenterResolverManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->scopeRepository = self::getContainer()->get(ScopeRepositoryInterface::class); + $this->registry = self::getContainer()->get(Registry::class); } public static function tearDownAfterClass(): void { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); - $repository = self::$container->get(AccompanyingPeriodRepository::class); + $em = self::getContainer()->get(EntityManagerInterface::class); + $repository = self::getContainer()->get(AccompanyingPeriodRepository::class); foreach (self::$periodsIdsToDelete as $id) { if (null === $period = $repository->find($id)) { diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php index 493e71e3a..94df35d88 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php @@ -43,9 +43,9 @@ final class PersonACLAwareRepositoryTest extends KernelTestCase { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); - $this->countryRepository = self::$container->get(CountryRepository::class); - $this->centerRepository = self::$container->get(CenterRepositoryInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); + $this->countryRepository = self::getContainer()->get(CountryRepository::class); + $this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); } public function testCountByCriteria() diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/UserRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/UserRepositoryTest.php index 3f81f1ebe..4ff03749b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Repository/UserRepositoryTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Repository/UserRepositoryTest.php @@ -27,7 +27,7 @@ class UserRepositoryTest extends KernelTestCase { parent::setUp(); self::bootKernel(); - $this->userRepository = self::$container->get(UserRepository::class); + $this->userRepository = self::getContainer()->get(UserRepository::class); } public function testFindAllAsArray(): void diff --git a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php index 1dbbceb3e..d1dda861f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php @@ -48,7 +48,7 @@ final class PersonVoterTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->voter = self::$container + $this->voter = self::getContainer() ->get('chill.person.security.authorization.person'); $this->prophet = new \Prophecy\Prophet(); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php index 3825f1404..99cf07488 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php @@ -30,7 +30,7 @@ final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizationNullOrNotNullHaveSameKeys() diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php index f69496b4d..5e775a53f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php @@ -27,7 +27,7 @@ final class AccompanyingPeriodOriginNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalization() diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php index 8c76d6d86..35fbecbf2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php @@ -29,7 +29,7 @@ final class AccompanyingPeriodResourceNormalizerTest extends KernelTestCase { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizeNullHasSameValueAsNotNull() diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php index c438be5f0..a142eb0aa 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php @@ -33,7 +33,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase protected function setUp(): void { parent::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalizationNull() diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php index 9cbeabea0..24ec19742 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/HouseholdNormalizerTest.php @@ -36,8 +36,8 @@ final class HouseholdNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } public function testNormalizationRecursive(): void diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php index 59bb0a731..b7de39813 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php @@ -74,7 +74,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function dataGeneratorNormalizationNullOrNotNullHaveSameKeys(): iterable @@ -255,10 +255,10 @@ final class PersonDocGenNormalizerTest extends KernelTestCase } $personDocGenNormalizer = new PersonDocGenNormalizer( - $personRender ?? self::$container->get(PersonRender::class), - $relationshipRepository ?? self::$container->get(RelationshipRepository::class), - $translator ?? self::$container->get(TranslatorInterface::class), - $translatableStringHelper ?? self::$container->get(TranslatableStringHelperInterface::class), + $personRender ?? self::getContainer()->get(PersonRender::class), + $relationshipRepository ?? self::getContainer()->get(RelationshipRepository::class), + $translator ?? self::getContainer()->get(TranslatorInterface::class), + $translatableStringHelper ?? self::getContainer()->get(TranslatableStringHelperInterface::class), $summaryBudget->reveal(), ); @@ -297,10 +297,10 @@ final class PersonDocGenNormalizerTest extends KernelTestCase } $normalizer = new PersonDocGenNormalizer( - $personRender ?? self::$container->get(PersonRender::class), + $personRender ?? self::getContainer()->get(PersonRender::class), $relationshipRepository, - $translator ?? self::$container->get(TranslatorInterface::class), - $translatableStringHelper ?? self::$container->get(TranslatableStringHelperInterface::class), + $translator ?? self::getContainer()->get(TranslatorInterface::class), + $translatableStringHelper ?? self::getContainer()->get(TranslatableStringHelperInterface::class), $summaryBudget->reveal() ); $normalizerManager = $this->prophesize(NormalizerInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php index 4c2c3b038..f60278d5f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php @@ -45,12 +45,12 @@ final class PersonJsonNormalizerTest extends KernelTestCase ->willReturn([]); $this->normalizer = $this->buildPersonJsonNormalizer( - self::$container->get(ChillEntityRenderExtension::class), - self::$container->get(PersonRepository::class), - self::$container->get(CenterResolverManagerInterface::class), + self::getContainer()->get(ChillEntityRenderExtension::class), + self::getContainer()->get(PersonRepository::class), + self::getContainer()->get(CenterResolverManagerInterface::class), $residentialAddressRepository->reveal(), - self::$container->get(PhoneNumberHelperInterface::class), - self::$container->get(NormalizerInterface::class) + self::getContainer()->get(PhoneNumberHelperInterface::class), + self::getContainer()->get(NormalizerInterface::class) ); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php index c55dc3f90..c2776b4dc 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php @@ -28,7 +28,7 @@ final class ResourceJsonNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->denormalizer = self::$container->get(DenormalizerInterface::class); + $this->denormalizer = self::getContainer()->get(DenormalizerInterface::class); } public function testDenormalize() diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php index a0aa62013..2d8bf9474 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php @@ -27,7 +27,7 @@ final class SocialActionNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalization() diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php index ccafddfe3..6a7a63341 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php @@ -27,7 +27,7 @@ final class SocialIssueNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); } public function testNormalization() diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/AccompanyingPeriodContextTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/AccompanyingPeriodContextTest.php index fe8fac217..d2eb29a1a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/AccompanyingPeriodContextTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/AccompanyingPeriodContextTest.php @@ -58,16 +58,16 @@ class AccompanyingPeriodContextTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->baseContextData = self::$container->get(BaseContextData::class); - $this->documentCategoryRepository = self::$container->get(DocumentCategoryRepository::class); - $this->em = self::$container->get(EntityManagerInterface::class); - $this->normalizer = self::$container->get(NormalizerInterface::class); - $this->personRender = self::$container->get(PersonRenderInterface::class); - $this->personRepository = self::$container->get(PersonRepository::class); - $this->translatableStringHelper = self::$container->get(TranslatableStringHelperInterface::class); - $this->translator = self::$container->get(TranslatorInterface::class); - $this->thirdPartyRender = self::$container->get(ThirdPartyRender::class); - $this->thirdPartyRepository = self::$container->get(ThirdPartyRepository::class); + $this->baseContextData = self::getContainer()->get(BaseContextData::class); + $this->documentCategoryRepository = self::getContainer()->get(DocumentCategoryRepository::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); + $this->personRender = self::getContainer()->get(PersonRenderInterface::class); + $this->personRepository = self::getContainer()->get(PersonRepository::class); + $this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class); + $this->translator = self::getContainer()->get(TranslatorInterface::class); + $this->thirdPartyRender = self::getContainer()->get(ThirdPartyRender::class); + $this->thirdPartyRepository = self::getContainer()->get(ThirdPartyRepository::class); } private function buildContext(): AccompanyingPeriodContext @@ -127,7 +127,7 @@ class AccompanyingPeriodContextTest extends KernelTestCase public function provideNormalizedData(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $thirdParty = $em->createQuery('SELECT t FROM '.ThirdParty::class.' t') ->setMaxResults(1) diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php index 772e669bb..d3bf71d04 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php @@ -86,18 +86,18 @@ final class PersonContextTest extends KernelTestCase // prophecy for other dependencies) $context = $this->buildPersonContext( null, - self::$container->get(BaseContextData::class), - self::$container->get(CenterResolverManagerInterface::class), - self::$container->get(DocumentCategoryRepository::class), - self::$container->get(EntityManagerInterface::class), - self::$container->get(NormalizerInterface::class), + self::getContainer()->get(BaseContextData::class), + self::getContainer()->get(CenterResolverManagerInterface::class), + self::getContainer()->get(DocumentCategoryRepository::class), + self::getContainer()->get(EntityManagerInterface::class), + self::getContainer()->get(NormalizerInterface::class), new ParameterBag(['chill_main' => ['acl' => ['form_show_scopes' => false]]]), null, - self::$container->get(Security::class), + self::getContainer()->get(Security::class), null, null, null, - self::$container->get(ThirdPartyRepository::class) + self::getContainer()->get(ThirdPartyRepository::class) ); $template = new DocGeneratorTemplate(); $template->setName(['fr' => 'test'])->setContext(AccompanyingPeriodContext::class) @@ -118,7 +118,7 @@ final class PersonContextTest extends KernelTestCase public function provideNormalizedData(): iterable { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); $thirdParty = $em->createQuery('SELECT t FROM '.ThirdParty::class.' t') ->setMaxResults(1) @@ -136,7 +136,7 @@ final class PersonContextTest extends KernelTestCase throw new \RuntimeException('No confirmed period in database'); } - $category = self::$container->get(DocumentCategoryRepository::class) + $category = self::getContainer()->get(DocumentCategoryRepository::class) ->findAll()[0]; if (null === $category) { diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProviderTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProviderTest.php index 6f378f02b..2fda9c3b8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProviderTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProviderTest.php @@ -38,8 +38,8 @@ class AccompanyingPeriodCalendarGenericDocProviderTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->security = self::$container->get(Security::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->security = self::getContainer()->get(Security::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php index afbc0b2ab..a876f643f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php @@ -32,7 +32,7 @@ class AccompanyingPeriodWorkEvaluationGenericDocProviderTest extends KernelTestC protected function setUp(): void { self::bootKernel(); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/PersonCalendarGenericDocProviderTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/PersonCalendarGenericDocProviderTest.php index 97ed90503..9bbe500fe 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/PersonCalendarGenericDocProviderTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/PersonCalendarGenericDocProviderTest.php @@ -32,8 +32,8 @@ class PersonCalendarGenericDocProviderTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->security = self::$container->get(Security::class); - $this->entityManager = self::$container->get(EntityManagerInterface::class); + $this->security = self::getContainer()->get(Security::class); + $this->entityManager = self::getContainer()->get(EntityManagerInterface::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Templating/Entity/ClosingMotiveRenderTest.php b/src/Bundle/ChillPersonBundle/Tests/Templating/Entity/ClosingMotiveRenderTest.php index cb7eb423a..eba8fc077 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Templating/Entity/ClosingMotiveRenderTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Templating/Entity/ClosingMotiveRenderTest.php @@ -27,7 +27,7 @@ class ClosingMotiveRenderTest extends KernelTestCase public static function setUpBeforeClass(): void { self::bootKernel(); - self::$closingMotiveRender = self::$container->get(ClosingMotiveRender::class); + self::$closingMotiveRender = self::getContainer()->get(ClosingMotiveRender::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php index 2670b2402..6a2ff3d77 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Timeline/TimelineAccompanyingPeriodTest.php @@ -32,7 +32,7 @@ final class TimelineAccompanyingPeriodTest extends WebTestCase { self::bootKernel(); - $qb = self::$container->get(EntityManagerInterface::class) + $qb = self::getContainer()->get(EntityManagerInterface::class) ->createQueryBuilder(); $personIds = $qb ->from(Person::class, 'p') diff --git a/src/Bundle/ChillPersonBundle/Tests/Validation/PersonValidationTest.php b/src/Bundle/ChillPersonBundle/Tests/Validation/PersonValidationTest.php index 636a059c5..97280fa1f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validation/PersonValidationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validation/PersonValidationTest.php @@ -29,7 +29,7 @@ class PersonValidationTest extends KernelTestCase { self::bootKernel(); - self::$validator = self::$container->get(ValidatorInterface::class); + self::$validator = self::getContainer()->get(ValidatorInterface::class); } /** diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php index efa273d22..577c81c2c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php @@ -29,7 +29,7 @@ final class PersonValidationTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->validator = self::$container->get(ValidatorInterface::class); + $this->validator = self::getContainer()->get(ValidatorInterface::class); } public function testBirthdateInFuture() diff --git a/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php b/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php index c64696b0e..0a95d5810 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php +++ b/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php @@ -29,7 +29,7 @@ final class AccompanyingPeriodLifecycle extends KernelTestCase public function testConfirm() { - $registry = self::$container->get(Registry::class); + $registry = self::getContainer()->get(Registry::class); $period = new AccompanyingPeriod(new \DateTime('now')); $workflow = $registry->get($period); diff --git a/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php b/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php index 8125d5413..9d6dc8ac7 100644 --- a/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php @@ -30,7 +30,7 @@ final class ReportDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get(ReportDateFilter::class); + $this->filter = self::getContainer()->get(ReportDateFilter::class); } public function getFilter() @@ -52,7 +52,7 @@ final class ReportDateFilterTest extends AbstractFilterTest { self::bootKernel(); - $em = self::$container->get(EntityManagerInterface::class); + $em = self::getContainer()->get(EntityManagerInterface::class); return [ $em->createQueryBuilder() diff --git a/src/Bundle/ChillTaskBundle/Tests/Repository/SingleTaskACLAwareRepositoryTest.php b/src/Bundle/ChillTaskBundle/Tests/Repository/SingleTaskACLAwareRepositoryTest.php index 206b71a1b..6b796d1ba 100644 --- a/src/Bundle/ChillTaskBundle/Tests/Repository/SingleTaskACLAwareRepositoryTest.php +++ b/src/Bundle/ChillTaskBundle/Tests/Repository/SingleTaskACLAwareRepositoryTest.php @@ -56,11 +56,11 @@ final class SingleTaskACLAwareRepositoryTest extends KernelTestCase { self::bootKernel(); - $this->em = self::$container->get(EntityManagerInterface::class); - $this->userRepository = self::$container->get(UserRepository::class); - $this->centerRepository = self::$container->get(CenterRepositoryInterface::class); - $this->scopeRepository = self::$container->get(ScopeRepository::class); - $this->personRepository = self::$container->get(PersonRepository::class); + $this->em = self::getContainer()->get(EntityManagerInterface::class); + $this->userRepository = self::getContainer()->get(UserRepository::class); + $this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class); + $this->scopeRepository = self::getContainer()->get(ScopeRepository::class); + $this->personRepository = self::getContainer()->get(PersonRepository::class); } public function testCountByAllViewable(): void diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php index 56d80e0dc..0c0010cae 100644 --- a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php +++ b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php @@ -32,7 +32,7 @@ final class ThirdPartyDocGenNormalizerTest extends KernelTestCase protected function setUp(): void { self::bootKernel(); - $this->normalizer = self::$container->get(NormalizerInterface::class); + $this->normalizer = self::getContainer()->get(NormalizerInterface::class); $this->phoneNumberUtil = PhoneNumberUtil::getInstance(); } diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php index 978c26636..e9032dd90 100644 --- a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php +++ b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php @@ -28,7 +28,7 @@ final class ThirdPartyJsonDenormalizerTest extends KernelTestCase { self::bootKernel(); - $this->normalizer = self::$container->get(DenormalizerInterface::class); + $this->normalizer = self::getContainer()->get(DenormalizerInterface::class); } public function testDenormalizeContact() diff --git a/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php b/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php index c5e687cac..5c22189d1 100644 --- a/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php +++ b/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php @@ -76,7 +76,7 @@ final class ChillDocumentLockManagerTest extends KernelTestCase private function makeManager(int $ttlAfterDeleteSeconds = -1): ChillDocumentLockManager { - $redis = self::$container->get(ChillRedis::class); + $redis = self::getContainer()->get(ChillRedis::class); return new ChillDocumentLockManager($redis, $ttlAfterDeleteSeconds); }