[Validator] fixed wrong test
minor #10819 Fix a test that was ambiguous (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

Fix a test that was ambiguous

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see #9634 for a discussion of this and #9383 for the report
| License       | MIT
| Doc PR        | n/a

This PR fixes a test that was always passing as the exception catch was catching the PHP notice but also the exception sent by `fail`, so it was useless. That said, I'm not even convinced that this test is useful at all.

Commits
-------

a94b4e0 [Validator] fixed wrong test