Problem/Motivation

In the Kernel test, there are a bunch of using the assertEqual method and it could be replaced already with assertEquals.

Steps to reproduce

bunch of calling deprecated assertEqual in views kernel tests

Proposed resolution

Apply the patch in the attachment.

Comments

alex.mazaltov created an issue. See original summary.

alex.mazaltov’s picture

I have passed all Kernel tests after changing deprecated assertion and here is a result:

Time: 5.4 hours, Memory: 24.00 MB

OK (289 tests, 4548 assertions)
alex.mazaltov’s picture

Issue summary: View changes
StatusFileSize
new1.15 MB
alex.mazaltov’s picture

Issue summary: View changes
alex.mazaltov’s picture

Status: Active » Needs review

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

thalles’s picture

Status: Needs review » Needs work

needs reroll

mohit.bansal623’s picture

Status: Needs work » Needs review
StatusFileSize
new113.56 KB
sulfikar_s’s picture

Hi, the patch in #8 failed to apply. So, I rerolled the patch.

Please review. I'm also attaching an interdiff.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Component: views.module » phpunit
Status: Needs review » Closed (duplicate)
Issue tags: -@deprecated
Related issues: +#3131281: Replace assertEqual() with assertEquals()

Thank you for your work on cleaning up Drupal core's code style!

However, we have a number of issues dealing with coding standards fixes and the community has decided that the best way to approach this is by fixing a rule at a time, rather than a file/module at a time.

See #2571965: [meta] Fix PHP coding standards in core, stage 1 where this effort is being organised and where you will find references to other coding standard issues that need work.

Closing this as a duplicate of #3131281: Replace assertEqual() with assertEquals(), adding credit over there.