mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix cs
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Services\Import;
|
||||
|
||||
use Chill\MainBundle\Entity\PostalCode;
|
||||
@@ -9,11 +18,18 @@ use Chill\MainBundle\Service\Import\AddressReferenceBaseImporter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
class AddressReferenceBaseImporterTest extends KernelTestCase
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
final class AddressReferenceBaseImporterTest extends KernelTestCase
|
||||
{
|
||||
private AddressReferenceBaseImporter $importer;
|
||||
private AddressReferenceRepository $addressReferenceRepository;
|
||||
|
||||
private EntityManagerInterface $entityManager;
|
||||
|
||||
private AddressReferenceBaseImporter $importer;
|
||||
|
||||
private PostalCodeRepository $postalCodeRepository;
|
||||
|
||||
protected function setUp(): void
|
||||
@@ -30,7 +46,7 @@ class AddressReferenceBaseImporterTest extends KernelTestCase
|
||||
public function testImportAddress(): void
|
||||
{
|
||||
$postalCode = (new PostalCode())
|
||||
->setRefPostalCodeId($postalCodeId = '1234'.uniqid())
|
||||
->setRefPostalCodeId($postalCodeId = '1234' . uniqid())
|
||||
->setPostalCodeSource('testing')
|
||||
->setCode('TEST456')
|
||||
->setName('testing');
|
||||
@@ -54,7 +70,8 @@ class AddressReferenceBaseImporterTest extends KernelTestCase
|
||||
|
||||
$addresses = $this->addressReferenceRepository->findByPostalCodePattern(
|
||||
$postalCode,
|
||||
'Rue test abcc guessed');
|
||||
'Rue test abcc guessed'
|
||||
);
|
||||
|
||||
$this->assertCount(1, $addresses);
|
||||
$this->assertEquals('Rue test abccc-guessed', $addresses[0]->getStreet());
|
||||
@@ -79,12 +96,11 @@ class AddressReferenceBaseImporterTest extends KernelTestCase
|
||||
|
||||
$addresses = $this->addressReferenceRepository->findByPostalCodePattern(
|
||||
$postalCode,
|
||||
'abcc guessed fixed');
|
||||
'abcc guessed fixed'
|
||||
);
|
||||
|
||||
$this->assertCount('1', $addresses);
|
||||
$this->assertEquals( 'Rue test abccc guessed fixed', $addresses[0]->getStreet());
|
||||
$this->assertEquals('Rue test abccc guessed fixed', $addresses[0]->getStreet());
|
||||
$this->assertEquals($previousAddressId, $addresses[0]->getId());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user