Closed (fixed)
Project:
Drupal core
Version:
11.0.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jul 2024 at 13:07 UTC
Updated:
21 Aug 2024 at 00:59 UTC
Jump to comment: Most recent
Comments
Comment #3
mondrakeComment #4
mondrakeComment #5
smustgrave commentedSeems straight forward
Wonder if there are other instances that could use StubControllerBase()?
Comment #6
mondrakeFound one in the same test, but no further.
Comment #7
smustgrave commentedNice!
Comment #8
catchOne question on the MR.
Comment #9
mondrake#8 copying here reply to the same comment in #3464213: Method getMockForAbstractClass() of class PHPUnit\Framework\TestCase is deprecated in PHPUnit 10 - replace in Plugin component tests:
I have seen multiple classes/namespaces in the same file having problems with Rector, see for instance here https://www.drupal.org/project/drupal/issues/3446693 where rector could not write 'use' imports, FQCN are written instead, and we'll be having to manage that manually.
So if it's not a big problem I'd rather go for a separate file, which IMHO is also more gentle to autoloading and readibility.
Comment #10
smustgrave commentedBelieve 1 question has been answered.
Comment #13
catchYeah that's fair enough. I'm a bit concerned we'll eventually end up with classes for tests that have subsequently been refactored to not use the classes, but we'll eventually figure that out if it happens.
Committed/pushed to 11.x and cherry-picked to 11.0.x, thanks!