Review main Merged

83032[TASK] Prevent undefined encryptionKey in tests

Torben Hansen CR +2 V +2 Easy +32 −16 updated 02/22/24, 11:10

Commit message

With #103046, `encryptionKey` has been removed from
`DefaultConfiguration.php`. This leads to PHP array
key warnings in unit tests.

The patch sets it for various tests.

Review

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

Issues 2

Files 10

Review log 2229

Show 34 earlier messages
  1. Torben Hansen uploaded patch set 1 02/18/24, 18:28

  2. core-ci voted on patch set 1 V +1 02/18/24, 18:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53311

  3. Benjamin Franzke updated the commit message in patch set 2 V +1 02/19/24, 04:46

  4. Benjamin Franzke voted on patch set 2 CR +1 V +1 02/19/24, 04:46

  1. core-ci voted on patch set 2 V +1 02/19/24, 04:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53322

  2. Oliver Klee commented on patch set 2 02/19/24, 12:38

    Is there a situation in the unit tests where the encryption key is defined at all? Or can we drop the backuping of the encryption key altogether?
  3. Torben Hansen uploaded patch set 3 CR +1 V +1 02/20/24, 09:58

  4. Torben Hansen commented on patch set 3 02/20/24, 09:59

    Reply

    The definition of the encryption key as global variable affects several other tests, since the tests expect the variable to exist. I think it is best to set/unset the encryption key in `setUp` and `tearDown`, so it is only defined in the scope of the current test. I have updated the patch.
  5. core-ci voted on patch set 3 V +1 02/20/24, 10:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53362

  6. Oliver Klee commented on patch set 3 02/20/24, 10:30

    Looks generally very good! I've added a remark concerning one place where I recommend we reorder the code.

    FormInlineAjaxControllerTest.php:36

    In general, I strongly recommend `setUp` and `tearDown` to be symmetric to avoid surprises related to the magic in the parent methods: In `setUp()`, the `parent::setup()` call should always come first, while in `tearDown()`, the `parent::tearDown()` call should come last.
  7. Benjamin Franzke uploaded patch set 4 V +1 02/20/24, 13:10

  8. Benjamin Franzke commented on patch set 4 02/20/24, 13:10

    FormInlineAjaxControllerTest.php:36 Reply

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

  10. Oliver Klee voted on patch set 4 CR +1 V +1 02/20/24, 14:40

  11. Stefan Bürk voted on patch set 4 CR +1 V +1 02/21/24, 13:32

  12. Christian Kuhn commented on patch set 4 CR -1 02/22/24, 09:38

    on it.
  13. Christian Kuhn commented on patch set 4 02/22/24, 09:52

    FormInlineAjaxControllerTest.php:36

    we don't need tearDown since backupGlobals=true is set via phpunit XML configuration.
  14. Christian Kuhn uploaded patch set 5 CR +1 V +1 02/22/24, 10:09

  15. Christian Kuhn uploaded patch set 6 02/22/24, 10:11

  16. Christian Kuhn commented on patch set 4 CR 0 02/22/24, 10:11

    FormInlineAjaxControllerTest.php:36 Reply

    Done
  17. core-ci voted on patch set 6 V +1 02/22/24, 10:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53438

  18. core-ci voted on patch set 5 V -1 02/22/24, 10:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53437

  19. Christian Kuhn uploaded patch set 7 V +1 02/22/24, 10:22

  20. core-ci voted on patch set 7 V +1 02/22/24, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53441

  21. Oliver Klee voted on patch set 7 CR +1 V +1 02/22/24, 10:31

  22. Christian Kuhn voted on patch set 7 CR +1 V +1 02/22/24, 10:32

  23. Stefan Bürk voted on patch set 7 CR +1 V +1 02/22/24, 10:32

  24. Christian Kuhn voted on patch set 7 CR +2 V +2 02/22/24, 11:10

  25. Christian Kuhn merged patch set 8 02/22/24, 11:10