AssertEqual() will be deprecated in Drupal 9 and removed in Drupal 10. It should be replaced by AssertEquals()
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3084931-9.assert-not-equals.patch | 932 bytes | jonathan1055 |
AssertEqual() will be deprecated in Drupal 9 and removed in Drupal 10. It should be replaced by AssertEquals()
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3084931-9.assert-not-equals.patch | 932 bytes | jonathan1055 |
Comments
Comment #2
sahana _n commentedRemoved deprecated method assertEqual() and replace with assertEquals()
Comment #3
jonathan1055 commentedThanks for noticing this. We did remove all assertEqual() in #2867271: assertEqual() is deprecated in Drupal 9. Replace with assertEquals() but I guess new ones got introduced (or re-introduced as is the case with that last one in SchedulerRevisioningTest).
Old:
assertEqual($actual, $expected, $message = '')New:
assertEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = FALSE, $ignoreCase = FALSE)Note that the first two parameters need to be swapped around. I know that when the tests all pass this is not relevent, but when a test fails we need to know which value was expected and which was the actual. So could you check this, and swap them in the calls if necessary.
Thanks.
Comment #4
shubham.prakash commentedHope this patch fixes the issue.
Comment #5
shubham.prakash commentedSorry for the last patch, as that was incorrect.
Comment #7
jonathan1055 commentedThank you, committed and fixed. I did notice that the second call in SchedulerRevisioningTest.php already had the arguments the wrong way so that one did not need to change. The first call (which was already assertEquals) had the arguments wrong too, so I fixed them both.
Comment #9
jonathan1055 commentedThere is one
assertNotEqual()which also needs to be changed.Comment #11
jonathan1055 commented