Comments

Sahana _N created an issue. See original summary.

sahana _n’s picture

Status: Active » Needs review
StatusFileSize
new3.87 KB

Removed deprecated method assertEqual() and replace with assertEquals()

jonathan1055’s picture

Status: Needs review » Needs work
Parent issue: » #3042677: Drupal 9 Deprecated Code Report for Scheduler

Thanks 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.

shubham.prakash’s picture

Status: Needs work » Needs review
StatusFileSize
new3.73 KB

Hope this patch fixes the issue.

shubham.prakash’s picture

StatusFileSize
new3.87 KB

Sorry for the last patch, as that was incorrect.

jonathan1055’s picture

Issue summary: View changes
Status: Needs review » Fixed
Related issues: +#2867271: assertEqual() is deprecated in Drupal 9. Replace with assertEquals()

Thank 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jonathan1055’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new932 bytes

There is one assertNotEqual() which also needs to be changed.

  • jonathan1055 committed 94fd0b5 on 8.x-1.x
    Issue #3084931 by jonathan1055: Replace deprecated assertNotEqual() with...
jonathan1055’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.