Closed (fixed)
Project:
Scheduler
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2017 at 06:34 UTC
Updated:
27 Mar 2019 at 20:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Pavan B S commentedApplying the patch, please review.
Comment #3
Pavan B S commentedComment #5
Pavan B S commentedApplying patch, please review.
Comment #6
jonathan1055 commentedHi Pavan B S,
Thank you for the patch. However, the link you give is to the AssertContent trait. Could you give a link to the coding standard you mention, and show exactly which methods/classes are now deprecated.
Jonathan
[edit: I've now fixed the links in the issue summary]
Comment #7
jonathan1055 commentedThe original patch had several changes to assert functions but the patch in #4 just concentrates on replacing AssertEqual() with AssertEquals() so we will keep this issue to address that single task.
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.
Comment #8
jonathan1055 commentedComment #9
jonathan1055 commentedLinked to parent issue.
Note that this is not currently (at 8.7.x or 8.6.10) producing any deprecation warnings during testing.
Comment #10
jonathan1055 commentedThe core issue #3031580: Undeprecate \Drupal\FunctionalTests\AssertLegacyTrait and \Drupal\KernelTests\AssertLegacyTrait in Drupal 8 removed the deprecation warnings from
FunctionalTests/AssertLegacyTrait.phpand/KernelTests/AssertLegacyTrait.phpso that is why we do not see them in test output.Looks like
AssertEqual()is not going to be deprecated until Drupal 9 and won't be disappearing until Drupal 10.Comment #11
jonathan1055 commentedUpdated title and issue summary. We can still work on this now, though.
Comment #12
jonathan1055 commentedThe patch in #4 from April 2017 only changed three test files. API, Multilingual and Tokens.
assertEqual()is used in five other tests: Admin, DefaultTime, Devel, PastDates and Revisioning. Some of these have been added since the the patch was created. Here's a patch for all eight tests affected.Note that with new syntax the expected value comes first, then the actual tested value. In the Revisioning test, we had a 4th parameter $group, which is not required (never was really)
Comment #14
jonathan1055 commentedCommitted.
Thanks Pavan B S for starting off this correction.
Comment #15
jonathan1055 commented