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:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user