From 1aa3759e3a74657bb63423f5e49a6e76abc5fe5e Mon Sep 17 00:00:00 2001 From: DjordyKoert Date: Fri, 27 Oct 2023 16:01:39 +0200 Subject: [PATCH] Expand tests with required field --- Tests/Functional/FunctionalTest.php | 20 +++++++++++++++++++ .../ValidationGroupsFunctionalTest.php | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/Tests/Functional/FunctionalTest.php b/Tests/Functional/FunctionalTest.php index 7c9bb784d..235b9854a 100644 --- a/Tests/Functional/FunctionalTest.php +++ b/Tests/Functional/FunctionalTest.php @@ -242,6 +242,15 @@ public function testUserModel() ], ], 'schema' => 'User', + 'required' => [ + 'id', + 'roles', + 'money', + 'creationDate', + 'users', + 'status', + 'dateAsInterface', + ], ], json_decode($this->getModel('User')->toJson(), true) ); @@ -428,6 +437,17 @@ public function testSymfonyConstraintDocumentation() 'required' => [ 'propertyNotBlank', 'propertyNotNull', + 'propertyAssertLength', + 'propertyRegex', + 'propertyCount', + 'propertyChoice', + 'propertyChoiceWithCallback', + 'propertyChoiceWithCallbackWithoutClass', + 'propertyChoiceWithMultiple', + 'propertyExpression', + 'propertyRange', + 'propertyLessThan', + 'propertyLessThanOrEqual', ], 'properties' => [ 'propertyNotBlank' => [ diff --git a/Tests/Functional/ValidationGroupsFunctionalTest.php b/Tests/Functional/ValidationGroupsFunctionalTest.php index c8891eca6..e9ece6b72 100644 --- a/Tests/Functional/ValidationGroupsFunctionalTest.php +++ b/Tests/Functional/ValidationGroupsFunctionalTest.php @@ -75,6 +75,10 @@ public function testConstraintDefaultGroupsAreRespectedWhenReadingAnnotations() ], 'type' => 'object', 'schema' => 'SymfonyConstraintsDefaultGroup', + 'required' => [ + 'property', + 'propertyInDefaultGroup', + ], ]; $this->assertEquals(