Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jul 2026 at 03:26 UTC
Updated:
11 Aug 2026 at 22:45 UTC
Jump to comment: Most recent
Comments
Comment #3
catchComment #4
smustgrave commentedseems like a good split
Comment #5
larowlanOne question on the MR, fine to self RTBC
Comment #6
mstrelan commentedThese two methods can go straight to kernel tests, I'll push something up shortly. That will reduce the time from 42.993s -> 8.230s.
Comment #7
mstrelan commentedPulled some setup from
ManageFieldsFunctionalTestBaseand converted to kernel test. We can introduce a base class for related kernel tests if we do more conversions. Feel free to revert if it's too much scope creep.Comment #8
smustgrave commentedNot to be decided here but first thought was why not use the trait FieldUiTestTrait but seems like it's only used in Functional tests.
1. Should we be doing a better job highlighting traits are for kernel/functional tests? It wasn't clear at all
2. Should there be one that is shared as more tests get converted to kernel
Comment #9
mstrelan commentedYes, great questions. Initially I was using FieldUiTestTrait, and it was working, but phpstan was complaining because other (unused) methods in the trait calls methods like submitForm() that don't exist for KernelTestBase. I think as more tests are converted we can look at refactoring the trait(s). We could also baseline / ignore the errors instead of duplicating the method if that's preferable.
Comment #10
catchOne comment on the MR.
On the trait, we could maybe introduce a new trait that's compatible with kernel tests, then include that trait in the existing one that adds the additional methods? Probably worth doing before we convert many more of these but I think the one method copied here could be factored back out in the issue that does that.
Comment #11
mstrelan commentedIf everyone is happy with the scope then lets do the trait split here.
Comment #12
catchThat seems fine and the trait split looks good.
Not really my code any more so I think I can re-RTBC.
Comment #15
larowlanCommitted and pushed b65177d2ce9 to main and 6723b54a6a7 to 11.x. Thanks!
Comment #17
mstrelan commentedFollow up: #3613739: [PP-1] Convert ManageFieldsFunctionalTestBase and sub classes to Kernel tests
This reduces test time from over 5 minutes to under 1 minute. Relies on some trickery to get submitForm working.