mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-26 16:45:01 +00:00
fix cs
This commit is contained in:
@@ -77,31 +77,6 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
||||
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
|
||||
}
|
||||
|
||||
public static function dataGeneratorNormalizationNullOrNotNullHaveSameKeys(): iterable
|
||||
{
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read']]];
|
||||
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read'], 'docgen:person:with-household' => true]];
|
||||
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read'], 'docgen:person:with-relations' => true]];
|
||||
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read'], 'docgen:person:with-budget' => true]];
|
||||
}
|
||||
|
||||
public static function generateData()
|
||||
{
|
||||
$person = new Person();
|
||||
$person
|
||||
->setFirstName('Renaud')
|
||||
->setLastName('Mégane');
|
||||
|
||||
$expected = [...self::BLANK, 'firstName' => 'Renaud', 'lastName' => 'Mégane', 'text' => 'Renaud Mégane'];
|
||||
|
||||
yield [$person, $expected, 'partial normalization for a person'];
|
||||
|
||||
yield [null, self::BLANK, 'normalization for a null person'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider dataGeneratorNormalizationNullOrNotNullHaveSameKeys
|
||||
*/
|
||||
@@ -118,6 +93,17 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
||||
);
|
||||
}
|
||||
|
||||
public static function dataGeneratorNormalizationNullOrNotNullHaveSameKeys(): iterable
|
||||
{
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read']]];
|
||||
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read'], 'docgen:person:with-household' => true]];
|
||||
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read'], 'docgen:person:with-relations' => true]];
|
||||
|
||||
yield [['docgen:expects' => Person::class, 'groups' => ['docgen:read'], 'docgen:person:with-budget' => true]];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider generateData
|
||||
*/
|
||||
@@ -236,6 +222,20 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
|
||||
]), $msg);
|
||||
}
|
||||
|
||||
public static function generateData()
|
||||
{
|
||||
$person = new Person();
|
||||
$person
|
||||
->setFirstName('Renaud')
|
||||
->setLastName('Mégane');
|
||||
|
||||
$expected = [...self::BLANK, 'firstName' => 'Renaud', 'lastName' => 'Mégane', 'text' => 'Renaud Mégane'];
|
||||
|
||||
yield [$person, $expected, 'partial normalization for a person'];
|
||||
|
||||
yield [null, self::BLANK, 'normalization for a null person'];
|
||||
}
|
||||
|
||||
private function buildNormalizer(
|
||||
?PersonRender $personRender = null,
|
||||
?RelationshipRepository $relationshipRepository = null,
|
||||
|
Reference in New Issue
Block a user