-
Notifications
You must be signed in to change notification settings - Fork 13
Form validation testing #20
Comments
What does prevent you from using a simple functional test? |
Execution time. |
With simple functional test i referred to your
Our Form Tests looks like this. We boot the kernel just once and only test the form itself, not the MVC layer. |
Ok that's fine to test your FormType (simalar to http://symfony.com/doc/current/cookbook/form/unit_testing.html). |
Yes, it looks similar to the Form Unit Testing, but its an integration test. The |
Hello.
Imagine a lot of form validation constraints, applied with annotations on entities.
To test them, functional web test cases (REST API), with assertions such as :
$this->assertEquals('My error message...', $data['errors']['children']['myProperty']['errors'][0]);
It works, but it takes too much time, much slower than a unit test or simple functional test (example Repository test).
Is there a way to test that in a faster and more isolated way using NoFrameworkBundle ?
Thanks
The text was updated successfully, but these errors were encountered: