Closed (fixed)
Project:
Drupal core
Version:
10.0.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2021 at 16:58 UTC
Updated:
18 Oct 2022 at 08:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
longwaveComment #3
longwaveActually we can remove part of the upgrade command as well.
Comment #4
longwaveWe should probably move the
use ProphecyTrait;to test base classes now, or even only use it in tests that want to use Prophecy?Comment #5
longwaveProphecy is widely used in unit and kernel tests so let's make it available in those base classes, but we only use it in one functional test so I only added it to that specific class.
Comment #7
longwaveFixed fails from #5, these are tests that extend PHPUnit's TestCase directly.
Comment #8
longwaveComment #9
longwaveReroll.
Comment #11
mglamanWill the trait not be added to all test cases? I know I've used prophecy mocks in Kernel tests.
Comment #12
longwaveIt's added to KernelTestBase and UnitTestCase in this patch. I'm not sure I see the usefulness in adding it to all functional tests.
Comment #13
neclimdulMakes sense to me.
Comment #14
alexpottResolved the conflicts in core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php on commit and ran the test locally.
Committed and pushed eaa010f97a to 10.1.x and b1305b5866 to 10.0.x. Thanks!