Review main Merged

69857[TASK] Refactor ViewHelper tests

Christian Kuhn CR +2 V +2 Impossible +4674 −8630 updated 07/19/21, 15:28

Commit message

We have a decent test coverage of view helpers, especially
those within ext:fluid. This is an important asset and we're
sure all main functionality works.

Most of the tests rely on ViewHelperBaseTestcase from the
testing framework. This class prepares the main mocking
of view helper dependencies. Reading the code it becomes
obvious that this approach is kinda unfortunate: View
helpers are part of a bigger system - they have some
general dependencies like the rendering context, the
request and render children. This leads to a mocking
party in many unit tests, making the test goal hard to
understand and follow.
The mock preparations and assumptions of internal handling
actively block further separation of concern patches
within ext:fluid since the ViewHelperBaseTestcase breaks
all the time.

The patch refactors all unit tests that extend
ViewHelperBaseTestcase towards functional tests:
Most of them simply create a StandaloneView, feed a
template string for the specific view helper and
string compare the render result. Some FE related VH
tests additionally set up a full frontend and retrieve
a rendered fluid view as sub request.

This makes the tests much easier to read, follow and
understand. The functional tests are now good examples
to show the various features of single VH's.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Jochen Roth +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Jochen Roth +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 120

Show 100 more files

Review log 3363

Show 1938 earlier messages
  1. Christian Kuhn uploaded patch set 1 07/14/21, 21:59

  2. Christian Kuhn uploaded patch set 2 07/14/21, 22:00

  3. core-ci voted on patch set 1 V -1 07/14/21, 22:01 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13338

  4. core-ci voted on patch set 2 V -1 07/14/21, 22:12 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13339

  5. Christian Kuhn uploaded patch set 3 07/14/21, 22:25

  6. core-ci voted on patch set 3 V +1 07/14/21, 22:42 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13340

  7. Christian Kuhn uploaded patch set 4 07/14/21, 23:18

  8. core-ci voted on patch set 4 V +1 07/14/21, 23:31 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13341

  9. Christian Kuhn uploaded patch set 5 07/14/21, 23:42

  10. core-ci voted on patch set 5 V -1 07/14/21, 23:50 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13342

  11. Christian Kuhn uploaded patch set 6 07/15/21, 00:11

  12. core-ci voted on patch set 6 V -1 07/15/21, 00:23 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13343

  13. Christian Kuhn uploaded patch set 7 07/15/21, 00:37

  14. core-ci voted on patch set 7 V -1 07/15/21, 00:51 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13344

  15. Christian Kuhn uploaded patch set 8 07/15/21, 00:58

  16. core-ci voted on patch set 8 V -1 07/15/21, 01:11 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13345

  17. Christian Kuhn uploaded patch set 9 07/16/21, 13:58

  18. Christian Kuhn uploaded patch set 10 07/16/21, 14:39

  19. core-ci voted on patch set 9 V +1 07/16/21, 15:02 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13392

  20. core-ci voted on patch set 10 V -1 07/16/21, 15:05 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13393

  21. Christian Kuhn uploaded patch set 11 07/16/21, 15:43

  22. Christian Kuhn uploaded patch set 12 07/16/21, 15:53

  23. core-ci voted on patch set 11 V +1 07/16/21, 15:54 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13395

  24. core-ci voted on patch set 12 V -1 07/16/21, 16:05 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13396

  25. Christian Kuhn uploaded patch set 13 07/16/21, 16:11

  26. core-ci voted on patch set 13 V -1 07/16/21, 16:22 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13397

  27. Christian Kuhn uploaded patch set 14 07/17/21, 09:16

  28. core-ci voted on patch set 14 V +1 07/17/21, 09:29 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13411

  29. Christian Kuhn uploaded patch set 15 07/17/21, 18:55

  30. core-ci voted on patch set 15 V -1 07/17/21, 19:07 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13417

  31. Christian Kuhn uploaded patch set 16 07/17/21, 20:58

  32. Christian Kuhn uploaded patch set 17 07/17/21, 21:08

  33. core-ci voted on patch set 16 V -1 07/17/21, 21:11 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13418

  34. core-ci voted on patch set 17 V +1 07/17/21, 21:21 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13419

  35. Christian Kuhn uploaded patch set 18 07/18/21, 19:19

  36. Christian Kuhn uploaded patch set 19 07/18/21, 19:20

  37. core-ci voted on patch set 18 V -1 07/18/21, 19:22 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13456

  38. core-ci voted on patch set 19 V +1 07/18/21, 19:32 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13457

  1. Christian Kuhn uploaded patch set 20 07/18/21, 20:14

  2. core-ci voted on patch set 20 V +1 07/18/21, 20:27 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13458

  3. Christian Kuhn uploaded patch set 21 07/18/21, 22:11

  4. core-ci voted on patch set 21 V -1 07/18/21, 22:23 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13459

  5. Christian Kuhn updated the commit message in patch set 22 07/18/21, 22:33

  6. core-ci voted on patch set 22 V -1 07/18/21, 22:47 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13460

  7. core-ci commented on patch set 22 07/18/21, 22:50 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13460

  8. core-ci commented on patch set 22 07/18/21, 22:58 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13460

  9. core-ci commented on patch set 22 07/18/21, 23:14 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13460

  10. Christian Kuhn uploaded patch set 23 07/19/21, 08:52

  11. core-ci voted on patch set 23 V -1 07/19/21, 09:05 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13473

  12. Christian Kuhn uploaded patch set 24 07/19/21, 10:04

  13. core-ci voted on patch set 24 V +1 07/19/21, 10:18 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13476

  14. Christian Kuhn rebased onto patch set 25 07/19/21, 11:22

  15. Christian Kuhn uploaded patch set 26 07/19/21, 11:23

  16. core-ci voted on patch set 26 V +1 07/19/21, 11:36 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13484

  17. core-ci voted on patch set 25 V +1 07/19/21, 11:39 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13483

  18. Jochen Roth commented on patch set 26 07/19/21, 13:23

    FormViewHelperTest.php:76

    Missing void here? Also see following lines 90, 101, 115, 129, 143, 157.
  19. Christian Kuhn uploaded patch set 27 07/19/21, 13:54

  20. core-ci voted on patch set 27 V +1 07/19/21, 14:11 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13502

  21. Jochen Roth voted on patch set 27 V +1 CR +1 07/19/21, 14:11

  22. Christian Kuhn commented on patch set 27 07/19/21, 14:12

    FormViewHelperTest.php:76 Reply

    Done
  23. Benni Mack voted on patch set 27 V +1 CR +1 07/19/21, 15:08

  24. Christian Kuhn voted on patch set 27 V +2 CR +2 07/19/21, 15:28

  25. Christian Kuhn merged patch set 28 07/19/21, 15:28