Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2020 at 17:04 UTC
Updated:
17 May 2020 at 15:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jungleComment #3
mero.s commentedPlease review patch.
Comment #4
jungleThanks @mero.S!
Checked on my local with regex
assert.+is_string, found no more assertions to replace.Did not mention to remove redundant assertion messages in the IS, my bad, removing it myself.
Comment #5
quietone commentedUsed the regex mentioned in #4 to get a list of all occurances, there were 33. Then applied the patch and ran the grep again, and 19 still found. The 19 are asserts and not subject to change here.As jungle says above, 'found no more assertions to replace.
Also reviewed the patch and found no problems, also all assertion messages removed.
Comment #8
catchCommitted/pushed to 9.1.x and 9.0.x, thanks!
Needs a backport for 8.9.x
Comment #9
mondrakeTo backport this (and similar others), we would need to do #3126787: [D8 only] Add forwards-compatibility shim for assertInternalType() replacements in phpunit 6&7 first, that is part of #3110543: [meta] Support PHPUnit 9 in Drupal 9.
Comment #10
jungleA patch for 8.9.x
Comment #12
jungleTesting failed as expected, see #9 for reasons.
Comment #13
mondrakeComment #14
mondrakeBlocker is in.
Comment #15
mondrake#10 is passing on D8.9 now.
Comment #16
xjmThese removed assertion messages are adding information about what's going on in the test: That these are conversions of various specific data types to a string. You can still mostly understand this from the surrounding inline comments, but if we do more work removing assertion messages from this file, we're going to need to add some comments.
Since this is a backport and it's mostly OK, I'm going to go ahead and commit the 8.9.x patch. Just remember to be careful about not losing information from the test when we get rid of static assertion messages. Thanks
Comment #17
mondrakenot pushed?
Comment #18
xjmGood catch. Apparently my push was rejected earlier with a bunch of access denied errors from GitLab... reommitted now. Thanks!
Comment #20
mondrake#18 sometimes there is quite a delay between a push and the appearance of the 'committed' comment on the issue itself. I've seen that myself on projects I maintain. But can's find a reason for that.