mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user