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

Override assertTag and assertNotTag to remove deprecation errors #43

Merged

Conversation

enov
Copy link
Contributor

@enov enov commented May 20, 2015

When running Kohana test suite with newer PHPUnit the assertion
methods assertTag and assertNotTag raise deprecation errors.

This is a patch to avoid the errors until phpunit-dom-assertions
gets released which should provide alternatives.

When running Kohana test suite with newer PHPUnit the assertion
methods `assertTag` and `assertNotTag` raise deprecation errors.

This is a patch to avoid the errors until phpunit-dom-assertions
gets released which should provide alternatives.
@enov
Copy link
Contributor Author

enov commented May 25, 2015

@acoulton you probably did not like this. Another option would be to patch only the affected TestCase classes. Or maybe to silence E_USER_DEPRECATED notices within the test methods.

@acoulton
Copy link
Member

@enov no, it was just I hadn't seen it :)

It's not the most beautiful thing, but I think it makes sense. Only patching the affected testcases would mean duplication, and having to patch others if we wanted to add assertTag before we add phpunit-dom-assertions.

Silencing E_USER_DEPRECATED is also an option, but would mean having to change and restore error reporting/handling every time - and we can't use try...finally in 3.3 so that would be just as messy if not more.

I think this workaround is as OK as it can be.

acoulton added a commit that referenced this pull request May 25, 2015
…ewer-phpunit

Override assertTag and assertNotTag to remove deprecation errors
@acoulton acoulton merged commit a95fd65 into 3.3/develop May 25, 2015
@enov
Copy link
Contributor Author

enov commented May 25, 2015

Exactly, I'll open an issue as a reminder to fix things with phpunit-dom-assertions once it is released.

@enov enov deleted the 3.3/patch/override-assertTag-for-newer-phpunit branch May 25, 2015 11:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants