mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
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.
This commit is contained in:
@@ -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()
|
||||
|
@@ -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()
|
||||
|
@@ -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()
|
||||
|
@@ -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()
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -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()
|
||||
|
@@ -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()
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user