Review main Merged

86143[TASK] Use frontend sub-request for `ShowImageControllerTest`

Stefan Bürk CR +2 V +2 Normal +65 −88 updated 09/17/24, 14:23

Commit message

Using method mocks to define what they should return to check
expectations only tests that the code flow does not change it.
This could be compared to a pure pipeline flow test to see if
water added on one end reaches the other end with same volume.

Tests based on this technique are useful in many cases,
but it is not the right way to verify and ensure that
something really returns what the normal code flow would
return. If the expectation in a test is not adjusted along
with the mocked (faked) return value such a test would
never reveal that the expecation does not match the real
world.

This change refactors `ShowImageControllerTest` using
as instance setup and frontend sub-requests
to test the "eID" handler implementation.

That reveales the expectation of having a leading
slash for the image path is incorrect. That is already
the case in real world instances.

Note it makes fully sense that such an early eID
handler using the FAL systems could not prefix images based
on current workflow and setup of the stack.

Review

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

Issues 1

Files 2

Review log 1013

  1. Stefan Bürk uploaded patch set 1 09/17/24, 12:48

  2. Stefan Bürk uploaded patch set 2 09/17/24, 12:51

  3. Stefan Bürk updated the commit message in patch set 3 09/17/24, 12:52

  4. Stefan Bürk uploaded patch set 4 09/17/24, 13:04

  5. core-ci voted on patch set 3 V -1 09/17/24, 13:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66017

  6. core-ci voted on patch set 4 V +1 09/17/24, 13:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66018

  7. Christian Kuhn updated the commit message in patch set 5 V +1 09/17/24, 14:04

  8. Christian Kuhn voted on patch set 5 CR +1 V +1 09/17/24, 14:04

  9. Garvin Hicking commented on patch set 5 CR +1 V +1 09/17/24, 14:12

    nice catch and improvement!
  10. core-ci voted on patch set 5 V +1 09/17/24, 14:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/66027

  11. Stefan Bürk voted on patch set 5 CR +2 09/17/24, 14:22

  12. Stefan Bürk voted on patch set 5 V +2 09/17/24, 14:22

  13. Stefan Bürk merged patch set 6 09/17/24, 14:23