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:03 UTC
Updated:
18 May 2020 at 16:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jungleComment #3
jungleUpdating IS and mentioning to remove assertion messages
Comment #4
jungleComment #5
jungleComment #6
mero.s commentedPlease review patch.
Comment #7
jungle@mero.S, I did assign to myself. 🤦 If you want to work on one issue, better to assign yourself first. I will still submit mine, interdiff and comments coming next.
Comment #8
jungleComment #9
jungleWrong interdiff submitted in #8, sorry.
Comment #10
mero.s commentedOkay, I'm sorry)
Comment #11
jungle@mero.S, no worries, anyway, thanks for working on this!
Review of #6
Instead of replacing it, I did remove the assertion in
ifwhich makes more sense to me.Note for reviewer(s): the assertion message below inside the foreach loop was kept on purpose, as no consent reached on such case yet.
Regex used:
assert.+is_objectComment #12
mero.s commentedthank you for explanation)
I will find the next issue
Comment #13
jungleWrong comment in #11, sorry again, in fact, 3 foreach loops in total were touched, one assertion message in one of them was kept on purpose only.
Comment #16
jungleFixing testing failure in #7. Doubt the original code inside
ifnever gets executed, as it's always false. -- assertTrue returns void/null?Comment #17
mondrake#16 see #3129074: Refactor assertions that use return values in conditionals
Comment #18
jungleCode snippet from #3129074. Thank you @mondrake! Then I'd postpone this to let #3129074 land first.
Comment #19
catchUnpostponing.
But also this can't be backported to 8.9.x until #3126787: [D8 only] Add forwards-compatibility shim for assertInternalType() replacements in phpunit 6&7 lands.
Comment #20
mondrakeComment #21
jungleRerolled from #16
Comment #22
mondrakeSupposing this is returning back green, it LGTM.
Comment #23
xjmSaving credit.
Comment #26
xjmCommitted to 9.1.x and 9.0.x, thanks!
Next we need an 8.9.x version of the patch to test with the shim.
Comment #27
jungleThanks all!
Rejected file: core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php
Comment #28
mondrakeLgtm
Comment #29
xjmComment #30
xjmCommitted the backport to 8.9.x. Thanks!