Closed (fixed)
Project:
Drupal core
Version:
main
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2026 at 06:37 UTC
Updated:
6 Jun 2026 at 20:45 UTC
Jump to comment: Most recent
Comments
Comment #2
mondrakeComment #4
mondrakeComment #5
smustgrave commentedWhat's the scope of this one?
Comment #6
dcam commentedI found a couple of documentation things to comment on. Otherwise, it looks good to me.
Comment #7
mondrakeThe scope is "do a first round with a limited number of fixes to establish a proper pattern", from the IS.
These changes are tricky and IMHO makes sense not to go too far ahead, if something needs to be redone, better with a limited patch,
If the question is why these tests and not others - just went through the raw job log of the failures in #3574681: [Nov 2026] Introduce support for PHPUnit 13.5 and picked the first ones I came across, stopping when the MR started becoming too large.
Comment #8
nitinkumar_7 commentedI reviewed and tested the changes on this branch locally under PHP 8.4.
The approach is correct and clean. Explicitly adding expectations like `expects($this->once())` or `expects($this->exactly(2))` to the mock method chains is the correct way to resolve these deprecations for PHPUnit 13.
Testing : Ran the modified test suites (including `EntityUnitTest`, `AccessResultTest`, `TwigExtensionTest`, and `FieldTest`) and confirmed that they all compile and pass perfectly with zero issues.
The changes look solid and are ready!
Comment #9
dcam commentedMy feedback was addressed. It looks good to me.
Comment #10
amateescu commentedCommitted and pushed 78f32f6b9fc to main. Thanks!