83032[TASK] Prevent undefined encryptionKey in tests
Commit message
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
- typo3/sysext/backend/Tests/Unit/Controller/FormInlineAjaxControllerTest.php4+6 −0
- typo3/sysext/core/Tests/Unit/Crypto/HashServiceTest.php+2 −1
- typo3/sysext/core/Tests/Unit/FormProtection/AbstractFormProtectionTest.php+1 −9
- typo3/sysext/core/Tests/Unit/FormProtection/BackendFormProtectionTest.php+1 −0
- typo3/sysext/core/Tests/Unit/FormProtection/InstallToolFormProtectionTest.php+6 −0
- typo3/sysext/core/Tests/Unit/Page/ImportMapTest.php+1 −0
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php+3 −0
- typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionConversionServiceTest.php+1 −0
- typo3/sysext/form/Tests/Unit/Domain/Configuration/FormDefinitionValidationServiceTest.php+10 −6
- typo3/sysext/frontend/Tests/Unit/Middleware/PageArgumentValidatorTest.php+1 −0
Review log 2229
Show 34 earlier messages
-
Torben Hansen uploaded patch set 1 02/18/24, 18:28
-
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
-
Benjamin Franzke updated the commit message in patch set 2
V +102/19/24, 04:46 -
Benjamin Franzke voted on patch set 2 CR +1 V +1 02/19/24, 04:46
-
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
-
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? -
Torben Hansen uploaded patch set 3
CR +1V +102/20/24, 09:58 -
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. -
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
-
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:36In 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. -
Benjamin Franzke uploaded patch set 4
V +102/20/24, 13:10 -
Benjamin Franzke commented on patch set 4 02/20/24, 13:10
FormInlineAjaxControllerTest.php:36ReplyDone -
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
-
Oliver Klee voted on patch set 4 CR +1 V +1 02/20/24, 14:40
-
Stefan Bürk voted on patch set 4 CR +1 V +1 02/21/24, 13:32
-
Christian Kuhn commented on patch set 4 CR -1 02/22/24, 09:38
on it. -
Christian Kuhn commented on patch set 4 02/22/24, 09:52
FormInlineAjaxControllerTest.php:36we don't need tearDown since backupGlobals=true is set via phpunit XML configuration. -
Christian Kuhn uploaded patch set 5
CR +1V +102/22/24, 10:09 -
Christian Kuhn uploaded patch set 6 02/22/24, 10:11
-
Christian Kuhn commented on patch set 4 CR 0 02/22/24, 10:11
FormInlineAjaxControllerTest.php:36ReplyDone -
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
-
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
-
Christian Kuhn uploaded patch set 7
V +102/22/24, 10:22 -
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
-
Oliver Klee voted on patch set 7 CR +1 V +1 02/22/24, 10:31
-
Christian Kuhn voted on patch set 7 CR +1 V +1 02/22/24, 10:32
-
Stefan Bürk voted on patch set 7 CR +1 V +1 02/22/24, 10:32
-
Christian Kuhn voted on patch set 7 CR +2 V +2 02/22/24, 11:10
-
Christian Kuhn merged patch set 8 02/22/24, 11:10