Simpletest's legacy assertion methods are deprecated.
The test assertion methods, originally inherited in Drupal 8 from Simpletest, have been replaced by PHPUnit methods along the Drupal 8 lifecycle, and are now formally deprecated for removal in Drupal 10.
See https://www.drupal.org/node/3129738 and replace a
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3158186-13.patch | 82.2 KB | sabina.h |
| #11 | 3158186-11.patch | 76.91 KB | rokzabukovec |
| #8 | interdiff_5-8.txt | 2.19 KB | rahulrasgon |
| #8 | 3158186-8.patch | 58.74 KB | rahulrasgon |
| #5 | 3158186-5.patch | 59.77 KB | siddhant.bhosale |
Comments
Comment #2
siddhant.bhosale commentedI have replaced all the occurances of
AssertLegacyTrait::assert(No)LinkByHref()with$this->assertSession()->linkByHrefExists() or $this->assertSession()->linkByHrefNotExists(). Please review.Comment #3
damienmckennaThank you for taking the time to do this.
That said, can you please combine the other patches into this one - there's no need for five+ issues for what is ultimately one set of changes (deprecated APIs in a trait).
Comment #4
siddhant.bhosale commentedComment #5
siddhant.bhosale commentedI have combined the patches for the following issues :
https://www.drupal.org/project/metatag/issues/3158187
https://www.drupal.org/project/metatag/issues/3158189
https://www.drupal.org/project/metatag/issues/3158255
and removed all the other deprecated assertions in this patch.
Please review.
Comment #7
rahulrasgon commentedComment #8
rahulrasgon commentedFixed the Failed test cases for patch #5.
Please review.
Comment #9
damienmckennaOne small request: could you please shorten the code so that the session is stored in a variable and then checked against instead of constantly calling $this->assertSession()? Thank you.
Comment #10
damienmckennaComment #11
rokzabukovec commentedI rerolled the patch and fix the assertSession to be stored in the variable so that it doesn't need to $this->assertsession() be called over and over again.
Please review.
Comment #12
rokzabukovec commentedComment #13
sabina.h commentedHi, I created a new patch because the previous ones aren't applying anymore. Needs review.
Comment #15
damienmckennaCommitted. Thank you all!
Comment #16
damienmckenna