Review main Merged

86099[BUGFIX] Ensure working functional test mocking in one test

Stefan Bürk CR +2 V +2 Easy +8 −5 updated 09/15/24, 03:54

Commit message

With #102422 the new `CacheDataCollector API` has been
introduced which also implemented a middleware functional
test.

Mocking the request to verify that the `withAttribute()`
method gets called with the correct identifier and that
the passed value is the expected object instance.

It seems that PHPUnit relies on type declaration when
createing mocks and and eventually returning the same
object if the return type matches the object type.

During nightly composer minimum version test this fails
now. Instead of raising packages and determine which one
includes type declaration to let PHPUnit kick in some
magic here the request method mock is explicitly set to
return the same object when calling the method with the
expected value.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 1

Review log 46

  1. Stefan Bürk uploaded patch set 1 09/15/24, 03:18

  2. core-ci voted on patch set 1 V -1 09/15/24, 03:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65782

  3. Stefan Bürk uploaded patch set 2 V -1 09/15/24, 03:38

  4. core-ci voted on patch set 2 V +1 09/15/24, 03:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65786

  5. Stefan Bürk commented on patch set 2 CR +2 V +2 09/15/24, 03:54

    Going to merge this because test only and fixes nightly (min/max) which should working in the hot phase before the feature freeze.
  6. Stefan Bürk merged patch set 3 09/15/24, 03:54