Skip to content
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

Unable to register custom Comparators #1474

Closed
kevinarcher opened this issue Oct 17, 2014 · 0 comments
Closed

Unable to register custom Comparators #1474

kevinarcher opened this issue Oct 17, 2014 · 0 comments
Milestone

Comments

@kevinarcher
Copy link

This commit introduced in PHPUnit 4.1.0 seems to have removed the ability to register custom comparators.

f0322b6#diff-bc1620baa64f3fb88768712abdc0e2fbR152

Is it possible to add support for this feature back, or is there a better way to validate objects equality in a custom way?

It's something that I've often relied on to prevent flaky tests when working with objects containing DateTimes using mocks with and assertEquals.

I haven't tested it recently, but in my experience the $delta parameter was not applied when comparing 2 objects directly containing a DataTime in a field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants