This commit is contained in:
2021-12-06 17:27:57 +01:00
parent 25147704ad
commit ebd817f61e
9 changed files with 52 additions and 46 deletions

View File

@@ -80,22 +80,6 @@ final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase
}
}
public function testNormalizeParticipations()
{
$period = new AccompanyingPeriod();
$period->addPerson($person = new Person());
$person->setFirstName('test');
$data = $this->normalizer->normalize($period, 'docgen', ['docgen:expects' => AccompanyingPeriod::class]);
$this->assertIsArray($data);
$this->assertArrayHasKey('participations', $data);
$this->assertCount(1, $data['participations']);
$this->assertArrayHasKey('currentParticipations', $data);
$this->assertCount(1, $data['currentParticipations']);
}
public function testNormalizeNull()
{
$data = $this->normalizer->normalize(null, 'docgen', ['docgen:expects' => AccompanyingPeriod::class]);
@@ -134,4 +118,20 @@ final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase
$this->assertEquals($item, $data[$key]);
}
}
public function testNormalizeParticipations()
{
$period = new AccompanyingPeriod();
$period->addPerson($person = new Person());
$person->setFirstName('test');
$data = $this->normalizer->normalize($period, 'docgen', ['docgen:expects' => AccompanyingPeriod::class]);
$this->assertIsArray($data);
$this->assertArrayHasKey('participations', $data);
$this->assertCount(1, $data['participations']);
$this->assertArrayHasKey('currentParticipations', $data);
$this->assertCount(1, $data['currentParticipations']);
}
}