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

Update for modern PHPUnit #6

Open
orlitzky opened this issue Feb 28, 2021 · 0 comments
Open

Update for modern PHPUnit #6

orlitzky opened this issue Feb 28, 2021 · 0 comments

Comments

@orlitzky
Copy link
Contributor

PHPUnit is up to version 9.x now, and the test suite stops working somewhere around 6.x. The first, big problem is that they refactored the names,

  • PHPUnit_Framework_TestCase -> PHPUnit\Framework\TestCase
  • PHPUnit_Framework_TestSuite -> PHPUnit\Framework\TestSuite

Then there are some minor things, like the assertEquals method will no longer accept a null for the string. Finally, in the latest versions of PHPUnit, a few functions were removed/renamed:

  • assertAttributeSame() is deprecated and will be removed in PHPUnit 9.
  • readAttribute() is deprecated and will be removed in PHPUnit 9.
  • getObjectAttribute() is deprecated and will be removed in PHPUnit 9.
  • The optional $delta parameter of assertEquals() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertEqualsWithDelta() instead.
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

1 participant