mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-04 16:06:13 +00:00
fix tests (wip)
This commit is contained in:
parent
62dabbe1e7
commit
f1b1771d6b
@ -75,7 +75,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
|
|||||||
$user = new User();
|
$user = new User();
|
||||||
$user->setUsername('User Test');
|
$user->setUsername('User Test');
|
||||||
|
|
||||||
$normalized = $this->normalizer->normalize($user, 'docgen', [AbstractNormalizer::GROUPS => ['docgen:read']]);
|
$normalized = $this->normalizer->normalize($user, 'docgen', [AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => User::class]);
|
||||||
$expected = [
|
$expected = [
|
||||||
'label' => 'User Test',
|
'label' => 'User Test',
|
||||||
'email' => '',
|
'email' => '',
|
||||||
|
@ -386,10 +386,7 @@ class User implements AdvancedUserInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function setEnabled(bool $enabled)
|
||||||
* @param bool $enabled
|
|
||||||
*/
|
|
||||||
public function setEnabled($enabled)
|
|
||||||
{
|
{
|
||||||
$this->enabled = $enabled;
|
$this->enabled = $enabled;
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ class HouseholdMemberController extends ApiController
|
|||||||
$_format,
|
$_format,
|
||||||
['groups' => ['read']]
|
['groups' => ['read']]
|
||||||
);
|
);
|
||||||
} catch (Exception\InvalidArgumentException|Exception\UnexpectedValueException $e) {
|
} catch (Exception\InvalidArgumentException | Exception\UnexpectedValueException $e) {
|
||||||
throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,8 +173,6 @@ class AccompanyingPeriod implements
|
|||||||
private bool $emergency = false;
|
private bool $emergency = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
|
||||||
*
|
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
@ -600,11 +598,6 @@ class AccompanyingPeriod implements
|
|||||||
throw new LogicException('no validation group permitted with this step');
|
throw new LogicException('no validation group permitted with this step');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get id.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
|
@ -48,7 +48,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$this->assertIsArray($actual);
|
$this->assertIsArray($actual);
|
||||||
$this->markTestSkipped("specification still not finalized");
|
$this->markTestSkipped('specification still not finalized');
|
||||||
$this->assertEqualsCanonicalizing(array_keys($expected), array_keys($actual));
|
$this->assertEqualsCanonicalizing(array_keys($expected), array_keys($actual));
|
||||||
|
|
||||||
foreach ($expected as $key => $item) {
|
foreach ($expected as $key => $item) {
|
||||||
@ -84,7 +84,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase
|
|||||||
];
|
];
|
||||||
|
|
||||||
$this->assertIsArray($actual);
|
$this->assertIsArray($actual);
|
||||||
$this->markTestSkipped("specification still not finalized");
|
$this->markTestSkipped('specification still not finalized');
|
||||||
$this->assertEqualsCanonicalizing(array_keys($expected), array_keys($actual));
|
$this->assertEqualsCanonicalizing(array_keys($expected), array_keys($actual));
|
||||||
|
|
||||||
foreach ($expected as $key => $item) {
|
foreach ($expected as $key => $item) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user