symfony-test-helpers icon indicating copy to clipboard operation
symfony-test-helpers copied to clipboard

Added a new Trait which allows to deal with Validator Constraints

Open liorchamla opened this issue 5 years ago • 0 comments

I felt there was no solution to see why a form would fail or not while testing a POST or a PUT Request, and I also wanted to test validation in a functional way (in a sense that it was a controller TestCase, not a simple entity validation test).

So I made this up : we use the profiler before the POST / PUT request, so after the request we can use informations collected by the validator component to assert anything we want about violations :)

Let me know what you think about that :)

liorchamla avatar Jan 09 '20 23:01 liorchamla