-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Add ConstraintValidator::formatValue() tests #33434
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
[Validator] Add ConstraintValidator::formatValue() tests #33434
Conversation
78e13ed
to
8753531
Compare
['"foo"', 'foo'], | ||
['array', []], | ||
['object', $toString = new TestToStringObject()], | ||
['ccc', $toString, ConstraintValidator::OBJECT_TO_STRING], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct, that this test depends on the test before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, it doesn't really depends of it. It just reuses the same object instance to avoid a new instantiation. It also highlights that the same object is formatted differently depending of the format parameter.
8753531
to
a1771ec
Compare
a1771ec
to
d695754
Compare
src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php
Outdated
Show resolved
Hide resolved
d695754
to
90ffed4
Compare
src/Symfony/Component/Validator/Tests/ConstraintValidatorTest.php
Outdated
Show resolved
Hide resolved
90ffed4
to
afb8d78
Compare
afb8d78
to
b688aa3
Compare
Thank you @fancyweb. |
… (fancyweb) This PR was squashed before being merged into the 3.4 branch (closes #33434). Discussion ---------- [Validator] Add ConstraintValidator::formatValue() tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - So #33401 tests can be built on top of this. Commits ------- b688aa3 [Validator] Add ConstraintValidator::formatValue() tests
So #33401 tests can be built on top of this.