Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form] rework form validator tests #37104

Closed
wants to merge 1 commit into from

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 4, 2020

Q A
Branch? 3.4
Bug fix? no
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

This will allow writing tests for #37103.

'constraints' => [new NotBlank(['groups' => 'group1'])],
'property_path' => '[foo]',
])
->add('field2', null, [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While working on #37085 I realised that we couldn't add this second field and assert its constraints are not validated. Investigating the cause for it I found out that the default ConstraintValidatorTestCase is not well suited for these kinds of tests where we cascade validation to nested fields.

@xabbuh xabbuh marked this pull request as ready for review June 5, 2020 06:24
@xabbuh xabbuh force-pushed the form-validator-tests branch 2 times, most recently from 2fbf8f5 to f062e08 Compare June 9, 2020 14:48
@xabbuh
Copy link
Member Author

xabbuh commented Jun 9, 2020

ping @symfony/mergers This is blocking #37103. :)

@yceruto
Copy link
Member

yceruto commented Jun 9, 2020

This looks good to me, but Travis isn't running here, does anyone know why?

@yceruto
Copy link
Member

yceruto commented Jun 9, 2020

Well, it looks like yes https://travis-ci.org/github/symfony/symfony/builds/696496883, but my github UI isn't displaying it 😕

@fabpot
Copy link
Member

fabpot commented Jun 9, 2020

Thank you @xabbuh.

fabpot added a commit that referenced this pull request Jun 9, 2020
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] rework form validator tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This will allow writing tests for #37103.

Commits
-------

f062e08 rework form validator tests
@xabbuh xabbuh closed this Jun 9, 2020
@xabbuh xabbuh deleted the form-validator-tests branch June 9, 2020 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants