XML-Schema-learner icon indicating copy to clipboard operation
XML-Schema-learner copied to clipboard

Update for modern PHPUnit

Open orlitzky opened this issue 4 years ago • 0 comments

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.

orlitzky avatar Feb 28 '21 16:02 orlitzky