Skip to content

Commit

Permalink
Expand tests with required field
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Oct 27, 2023
1 parent c7396d5 commit 1aa3759
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Tests/Functional/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ public function testUserModel()
],
],
'schema' => 'User',
'required' => [
'id',
'roles',
'money',
'creationDate',
'users',
'status',
'dateAsInterface',
],
],
json_decode($this->getModel('User')->toJson(), true)
);
Expand Down Expand Up @@ -428,6 +437,17 @@ public function testSymfonyConstraintDocumentation()
'required' => [
'propertyNotBlank',
'propertyNotNull',
'propertyAssertLength',
'propertyRegex',
'propertyCount',
'propertyChoice',
'propertyChoiceWithCallback',
'propertyChoiceWithCallbackWithoutClass',
'propertyChoiceWithMultiple',
'propertyExpression',
'propertyRange',
'propertyLessThan',
'propertyLessThanOrEqual',
],
'properties' => [
'propertyNotBlank' => [
Expand Down
4 changes: 4 additions & 0 deletions Tests/Functional/ValidationGroupsFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public function testConstraintDefaultGroupsAreRespectedWhenReadingAnnotations()
],
'type' => 'object',
'schema' => 'SymfonyConstraintsDefaultGroup',
'required' => [
'property',
'propertyInDefaultGroup',
],
];

$this->assertEquals(
Expand Down

0 comments on commit 1aa3759

Please sign in to comment.