apply rector ruleset "symfony constructor injection"

This commit is contained in:
2025-11-03 16:22:02 +01:00
parent adab2ffe63
commit 7654db4e39
124 changed files with 183 additions and 171 deletions

View File

@@ -55,7 +55,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
$maxResults = $maxGenerated * 8;
self::bootKernel();
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$em = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class);
$qb = $em->createQueryBuilder();
$personIds = $qb
@@ -101,7 +101,7 @@ final class AccompanyingPeriodConfidentialTest extends WebTestCase
$period = self::getContainer()->get(AccompanyingPeriodRepository::class)
->find($periodId);
$em = self::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$em = self::$kernel->getContainer()->get(\Doctrine\ORM\EntityManager::class);
$violations = self::$validator->validate($period, null, ['confirmed']);

View File

@@ -56,7 +56,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
{
self::bootKernel();
self::$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
->get(\Doctrine\ORM\EntityManager::class);
}
/**

View File

@@ -46,7 +46,7 @@ final class PersonAddressControllerTest extends WebTestCase
self::bootKernel();
$em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
->get(\Doctrine\ORM\EntityManager::class);
$center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneBy(['name' => 'Center A']);
@@ -69,7 +69,7 @@ final class PersonAddressControllerTest extends WebTestCase
self::bootKernel();
$this->em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
->get(\Doctrine\ORM\EntityManager::class);
$this->postalCode = $this->em->getRepository(\Chill\MainBundle\Entity\PostalCode::class)
->findOneBy(['code' => 1000]);

View File

@@ -49,7 +49,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
self::bootKernel(['environment' => 'test_with_hidden_fields']);
$this->em = self::$kernel->getContainer()
->get('doctrine.orm.entity_manager');
->get(\Doctrine\ORM\EntityManager::class);
$center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneBy(['name' => 'Center A']);

View File

@@ -43,7 +43,7 @@ class WorkflowSignatureCancelControllerStepTest extends WebTestCase
{
self::bootKernel();
$this->formFactory = self::getContainer()->get('form.factory');
$this->formFactory = self::getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class);
$this->signatureStepStateChanger = self::getContainer()->get(SignatureStepStateChanger::class);
$this->chillUrlGenerator = self::getContainer()->get(ChillUrlGeneratorInterface::class);

View File

@@ -29,7 +29,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_administrative_location');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\AdministrativeLocationAggregator::class);
}
public function getAggregator(): AdministrativeLocationAggregator

View File

@@ -29,7 +29,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_closingmotive');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingMotiveAggregator::class);
}
public function getAggregator(): ClosingMotiveAggregator

View File

@@ -29,7 +29,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_confidential');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ConfidentialAggregator::class);
}
public function getAggregator(): ConfidentialAggregator

View File

@@ -29,7 +29,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_duration');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\DurationAggregator::class);
}
public function getAggregator(): DurationAggregator

View File

@@ -29,7 +29,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_emergency');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EmergencyAggregator::class);
}
public function getAggregator(): EmergencyAggregator

View File

@@ -29,7 +29,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluation');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EvaluationAggregator::class);
}
public function getAggregator(): EvaluationAggregator

View File

@@ -31,7 +31,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_geographicalunitstat');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\GeographicalUnitStatAggregator::class);
}
public function getAggregator(): GeographicalUnitStatAggregator

View File

@@ -29,7 +29,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_intensity');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\IntensityAggregator::class);
}
public function getAggregator(): IntensityAggregator

View File

@@ -29,7 +29,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_origin');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\OriginAggregator::class);
}
public function getAggregator(): OriginAggregator

View File

@@ -30,7 +30,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerAggregator::class);
}
/**

View File

@@ -29,7 +29,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_requestor');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\RequestorAggregator::class);
}
public function getAggregator(): RequestorAggregator

View File

@@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_scope');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator::class);
}
public function getAggregator(): ScopeAggregator

View File

@@ -29,7 +29,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialaction');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialActionAggregator::class);
}
public function getAggregator(): SocialActionAggregator

View File

@@ -29,7 +29,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialissue');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialIssueAggregator::class);
}
public function getAggregator(): SocialIssueAggregator

View File

@@ -30,7 +30,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_step');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\StepAggregator::class);
}
public function getAggregator(): StepAggregator

View File

@@ -30,7 +30,7 @@ final class UserJobAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_job');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\UserJobAggregator::class);
}
/**

View File

@@ -29,7 +29,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluationtype');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\EvaluationAggregators\EvaluationTypeAggregator::class);
}
public function getAggregator(): EvaluationTypeAggregator

View File

@@ -30,7 +30,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_childrennumber');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\ChildrenNumberAggregator::class);
}
public function getAggregator(): ChildrenNumberAggregator

View File

@@ -30,7 +30,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_composition');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\CompositionAggregator::class);
}
public function getAggregator(): CompositionAggregator

View File

@@ -30,7 +30,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_age');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\AgeAggregator::class);
}
public function getAggregator(): AgeAggregator

View File

@@ -29,7 +29,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_country_of_birth');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\CountryOfBirthAggregator::class);
}
public function getAggregator(): CountryOfBirthAggregator

View File

@@ -29,7 +29,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_gender');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\GenderAggregator::class);
}
public function getAggregator(): GenderAggregator

View File

@@ -32,7 +32,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_position');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\HouseholdPositionAggregator::class);
}
public function getAggregator(): HouseholdPositionAggregator

View File

@@ -29,7 +29,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_marital_status');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\MaritalStatusAggregator::class);
}
public function getAggregator(): MaritalStatusAggregator

View File

@@ -29,7 +29,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_nationality');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\PersonAggregators\NationalityAggregator::class);
}
public function getAggregator(): NationalityAggregator

View File

@@ -29,7 +29,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_action_type');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ActionTypeAggregator::class);
}
public function getAggregator(): ActionTypeAggregator

View File

@@ -29,7 +29,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goal');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalAggregator::class);
}
public function getAggregator(): GoalAggregator

View File

@@ -29,7 +29,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goalresult');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalResultAggregator::class);
}
public function getAggregator(): GoalResultAggregator

View File

@@ -29,7 +29,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_job');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\JobAggregator::class);
}
public function getAggregator(): JobAggregator

View File

@@ -29,7 +29,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_result');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ResultAggregator::class);
}
public function getAggregator(): ResultAggregator

View File

@@ -29,7 +29,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
{
self::bootKernel();
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_scope');
$this->aggregator = self::getContainer()->get(\Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ScopeAggregator::class);
}
public function getAggregator(): ScopeAggregator

View File

@@ -43,7 +43,7 @@ final class ListPersonTest extends AbstractExportTest
$request->getLocale()->willReturn('fr');
self::getContainer()->get('request_stack')
self::getContainer()->get(\Symfony\Component\HttpFoundation\RequestStack::class)
->push($request->reveal());
}

View File

@@ -31,7 +31,7 @@ final class StatAccompanyingCourseDurationTest extends AbstractExportTest
{
self::bootKernel();
$this->export = self::getContainer()->get('chill.person.export.avg_accompanyingcourse_duration');
$this->export = self::getContainer()->get(\Chill\PersonBundle\Export\Export\StatAccompanyingCourseDuration::class);
}
public function getExport()

View File

@@ -30,7 +30,7 @@ final class ActiveOnDateFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_activeondate');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOnDateFilter::class);
}
public function getFilter(): ActiveOnDateFilter

View File

@@ -30,7 +30,7 @@ final class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_activeonedaybetweendates');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOneDayBetweenDatesFilter::class);
}
public function getFilter(): ActiveOneDayBetweenDatesFilter

View File

@@ -29,7 +29,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_administrative_location');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\AdministrativeLocationFilter::class);
}
public function getFilter(): AdministrativeLocationFilter

View File

@@ -30,7 +30,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_closingmotive');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ClosingMotiveFilter::class);
}
public function getFilter(): ClosingMotiveFilter

View File

@@ -28,7 +28,7 @@ final class ConfidentialFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_confidential');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ConfidentialFilter::class);
}
public function getFilter(): ConfidentialFilter

View File

@@ -28,7 +28,7 @@ final class EmergencyFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_emergency');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EmergencyFilter::class);
}
public function getFilter(): EmergencyFilter

View File

@@ -29,7 +29,7 @@ final class EvaluationFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_evaluation');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EvaluationFilter::class);
}
public function getFilter(): EvaluationFilter

View File

@@ -31,7 +31,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_geographicalunitstat');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\GeographicalUnitStatFilter::class);
}
public function getFilter(): GeographicalUnitStatFilter

View File

@@ -29,7 +29,7 @@ final class IntensityFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_intensity');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\IntensityFilter::class);
}
public function getFilter(): IntensityFilter

View File

@@ -30,7 +30,7 @@ final class OpenBetweenDatesFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_openbetweendates');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OpenBetweenDatesFilter::class);
}
public function getFilter(): OpenBetweenDatesFilter

View File

@@ -30,7 +30,7 @@ final class OriginFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_origin');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OriginFilter::class);
}
public function getFilter(): OriginFilter

View File

@@ -29,7 +29,7 @@ final class RequestorFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_requestor');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\RequestorFilter::class);
}
public function getFilter(): RequestorFilter

View File

@@ -31,7 +31,7 @@ final class SocialActionFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_socialaction');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialActionFilter::class);
}
public function getFilter(): SocialActionFilter

View File

@@ -31,7 +31,7 @@ final class SocialIssueFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_socialissue');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialIssueFilter::class);
}
public function getFilter(): SocialIssueFilter

View File

@@ -30,7 +30,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_evaluationtype');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\EvaluationFilters\EvaluationTypeFilter::class);
}
public function getFilter(): EvaluationTypeFilter

View File

@@ -29,7 +29,7 @@ final class MaxDateFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_maxdate');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\EvaluationFilters\MaxDateFilter::class);
}
public function getFilter(): MaxDateFilter

View File

@@ -31,7 +31,7 @@ final class CompositionFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_household_composition');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\HouseholdFilters\CompositionFilter::class);
}
public function getFilter(): CompositionFilter

View File

@@ -30,7 +30,7 @@ final class AgeFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_age');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\AgeFilter::class);
}
public function getFilter(): AgeFilter

View File

@@ -30,7 +30,7 @@ final class BirthdateFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_birthdate');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\BirthdateFilter::class);
}
public function getFilter(): BirthdateFilter

View File

@@ -30,7 +30,7 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_dead_or_alive');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\DeadOrAliveFilter::class);
}
public function getFilter(): DeadOrAliveFilter

View File

@@ -30,7 +30,7 @@ final class DeathdateFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_deathdate');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\DeathdateFilter::class);
}
public function getFilter(): DeathdateFilter

View File

@@ -29,7 +29,7 @@ final class GenderFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_gender');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\GenderFilter::class);
}
public function getFilter(): GenderFilter

View File

@@ -30,7 +30,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_marital_status');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\MaritalStatusFilter::class);
}
public function getFilter(): MaritalStatusFilter

View File

@@ -30,7 +30,7 @@ final class NationalityFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_nationality');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\NationalityFilter::class);
}
public function getFilter(): NationalityFilter

View File

@@ -33,7 +33,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_thirdparty');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtThirdpartyFilter::class);
}
public function getFilter(): ResidentialAddressAtThirdpartyFilter

View File

@@ -31,7 +31,7 @@ final class ResidentialAddressAtUserFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_user');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtUserFilter::class);
}
public function getFilter(): ResidentialAddressAtUserFilter

View File

@@ -31,7 +31,7 @@ final class JobFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_job');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\SocialWorkFilters\JobFilter::class);
}
public function getFilter(): JobFilter

View File

@@ -31,7 +31,7 @@ final class ReferrerFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_treatingagent');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\SocialWorkFilters\ReferrerFilter::class);
}
public function getFilter(): ReferrerFilter

View File

@@ -30,7 +30,7 @@ final class ScopeFilterTest extends AbstractFilterTest
{
self::bootKernel();
$this->filter = self::getContainer()->get('chill.person.export.filter_scope');
$this->filter = self::getContainer()->get(\Chill\PersonBundle\Export\Filter\SocialWorkFilters\ScopeFilter::class);
}
public function getFilter(): ScopeFilter

View File

@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Tests\Form\Type;
use Chill\PersonBundle\Form\Type\PickPersonType;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
/**
@@ -36,14 +37,14 @@ final class PickPersonTypeTest extends KernelTestCase
{
self::bootKernel();
$this->user = self::getContainer()->get('doctrine.orm.entity_manager')
$this->user = self::getContainer()->get(\Doctrine\ORM\EntityManager::class)
->getRepository(\Chill\MainBundle\Entity\User::class)
->findOneBy(['username' => 'multi_center']);
$this->formFactory = self::getContainer()->get('form.factory');
$this->formFactory = self::getContainer()->get(\Symfony\Component\Form\FormFactoryInterface::class);
$token = (new UsernamePasswordToken($this->user, 'password', 'firewall'));
self::getContainer()->get('security.token_storage')
self::getContainer()->get(TokenStorageInterface::class)
->setToken($token);
}
@@ -69,7 +70,7 @@ final class PickPersonTypeTest extends KernelTestCase
public function testWithOptionCenter(): void
{
$this->markTestSkipped('need to inject locale into url generator without request');
$center = self::getContainer()->get('doctrine.orm.entity_manager')
$center = self::getContainer()->get(\Doctrine\ORM\EntityManager::class)
->getRepository(\Chill\MainBundle\Entity\Center::class)
->findOneBy(['name' => 'Center A']);
@@ -102,7 +103,7 @@ final class PickPersonTypeTest extends KernelTestCase
public function testWithOptionCenters(): void
{
$this->markTestSkipped('need to inject locale into url generator without request');
$centers = self::getContainer()->get('doctrine.orm.entity_manager')
$centers = self::getContainer()->get(\Doctrine\ORM\EntityManager::class)
->getRepository(\Chill\MainBundle\Entity\Center::class)
->findAll();

View File

@@ -49,7 +49,7 @@ final class PersonVoterTest extends KernelTestCase
{
self::bootKernel();
$this->voter = self::getContainer()
->get('chill.person.security.authorization.person');
->get(\Chill\PersonBundle\Security\Authorization\PersonVoter::class);
$this->prophet = new \Prophecy\Prophet();
}