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

CommentFileSizeAuthor
#2 3248810-2.patch1.7 KBdaffie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
FileSize
1.7 KB

The fix.

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good

bbrala’s picture

+1

  • catch committed b9fd8ef on 9.4.x
    Issue #3248810 by daffie: [Symfony 6] The Drupal\Tests\jsonapi\Kernel\...
catch’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.4.x and cherry-picked to 9.3.x, thanks!

  • catch committed 580535b on 9.3.x
    Issue #3248810 by daffie: [Symfony 6] The Drupal\Tests\jsonapi\Kernel\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.