Merge branch 'fix-tests-main' into 'master'

Fix tests for chill main bundle

See merge request Chill-Projet/chill-bundles!24
This commit is contained in:
2021-04-29 22:35:47 +00:00
22 changed files with 48 additions and 337 deletions

View File

@@ -23,6 +23,7 @@
namespace Chill\PersonBundle\Repository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;

View File

@@ -38,7 +38,7 @@ class AccompanyingPeriodNormalizer implements NormalizerInterface, NormalizerAwa
'remark' => $period->getRemark(),
'participations' => $this->normalizer->normalize($period->getParticipations(), $format),
'closingMotive' => $this->normalizer->normalize($period->getClosingMotive(), $format),
'user' => $period->getUser() ? $this->normalize($period->getUser(), $format) : null,
'user' => $this->normalizer->normalize($period->getUser(), $format),
'step' => $period->getStep(),
'origin' => $this->normalizer->normalize($period->getOrigin(), $format),
'intensity' => $period->getIntensity(),

View File

@@ -55,7 +55,7 @@ class PersonNormalizer implements
'id' => $person->getId(),
'firstName' => $person->getFirstName(),
'lastName' => $person->getLastName(),
'birthdate' => $person->getBirthdate(),
'birthdate' => $person->getBirthdate() ? $this->normalizer->normalize($person->getBirthdate()) : null,
'center' => $this->normalizer->normalize($person->getCenter())
];
}