Problem/Motivation
Drupal\Tests\jsonapi\Kernel\EventSubscriber\ResourceObjectNormalizerCacherTest fails with Symfony 5 with the following message:
rupal\Tests\jsonapi\Kernel\EventSubscriber\ResourceObjectNormalizerCacherTest::testLinkNormalizationCacheability
Prophecy\Exception\Doubler\ClassMirrorException: Could not reflect class Symfony\Component\HttpKernel\Event\TerminateEvent as it is marked final.
Proposed resolution
Mocking or prophesizing final classes is impossible, therefor create an instance of the class and use that in testing.
Remaining tasks
TBD
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
None
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3248810-2.patch | 1.7 KB | daffie |
Comments
Comment #2
daffie commentedThe fix.
Comment #3
larowlanLooks good
Comment #4
bbrala+1
Comment #6
catchCommitted/pushed to 9.4.x and cherry-picked to 9.3.x, thanks!