Skip to content

[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

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Sep 2, 2019

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.

@fancyweb fancyweb force-pushed the validator-test-constraint-validator-format-value branch from 78e13ed to 8753531 Compare September 2, 2019 17:08
['"foo"', 'foo'],
['array', []],
['object', $toString = new TestToStringObject()],
['ccc', $toString, ConstraintValidator::OBJECT_TO_STRING],
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@fancyweb fancyweb force-pushed the validator-test-constraint-validator-format-value branch from 8753531 to a1771ec Compare September 3, 2019 12:10
@fancyweb fancyweb changed the base branch from 4.4 to 3.4 September 3, 2019 13:02
@fancyweb fancyweb force-pushed the validator-test-constraint-validator-format-value branch from a1771ec to d695754 Compare September 3, 2019 13:14
@fancyweb fancyweb force-pushed the validator-test-constraint-validator-format-value branch from d695754 to 90ffed4 Compare September 3, 2019 15:24
@fancyweb fancyweb force-pushed the validator-test-constraint-validator-format-value branch from 90ffed4 to afb8d78 Compare September 3, 2019 15:50
@fabpot fabpot force-pushed the validator-test-constraint-validator-format-value branch from afb8d78 to b688aa3 Compare September 3, 2019 16:24
@fabpot
Copy link
Member

fabpot commented Sep 3, 2019

Thank you @fancyweb.

fabpot added a commit that referenced this pull request Sep 3, 2019
… (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
@fabpot fabpot merged commit b688aa3 into symfony:3.4 Sep 3, 2019
@fancyweb fancyweb deleted the validator-test-constraint-validator-format-value branch September 3, 2019 17:35
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.

6 participants