78138[TASK] Replace withConsecutive() calls in ext:backend tests
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oliver Klee +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- core-ci +1 CI
Issues 1
Files 8
- typo3/sysext/backend/Tests/Unit/Form/Container/PaletteAndSingleContainerTest.php5+23 −5
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseLanguageRowsTest.php+28 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseParentPageRowTest.php+19 −8
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseUserPermissionCheckTest.php+16 −7
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaCheckboxItemsTest.php+8 −1
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRadioItemsTest.php+10 −3
- typo3/sysext/backend/Tests/Unit/Form/NodeExpansion/FieldControlTest.php+10 −2
- typo3/sysext/backend/Tests/Unit/Form/FormDataCompilerTest.php+3 −3
Review log 1619
-
Torben Hansen uploaded patch set 1 03/16/23, 08:49
-
Oliver Klee updated the commit message in patch set 2 03/16/23, 08:56
-
Oliver Klee commented on patch set 2 03/16/23, 08:57
-
core-ci voted on patch set 1 V +1 03/16/23, 08:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39039
-
Oliver Klee commented on patch set 2 03/16/23, 09:04
On it. -
Torben Hansen commented on patch set 2 03/16/23, 09:10
PaletteAndSingleContainerTest.php:77Reply`$args` as argument will always be an array, but the return type might differ from case to case (e.g. `$args[0]` might even have different types for the same test scenario). What is the benefit, if we would have types here? IMO, this makes the code even more difficult to read than it actually is. -
core-ci voted on patch set 2 V +1 03/16/23, 09:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39041
-
Oliver Klee commented on patch set 2 03/16/23, 09:16
Reply
DonePaletteAndSingleContainerTest.php:77ReplyDone -
Oliver Klee uploaded patch set 3
V +103/16/23, 09:16 -
Oliver Klee commented on patch set 3 03/16/23, 09:17
PaletteAndSingleContainerTest.php:77ReplyIt helps static analysis and helps us catch incorrect test. -
Oliver Klee commented on patch set 3 03/16/23, 09:21
PaletteAndSingleContainerTest.php:77ReplyPlease note that the type of `...$args` will not be array, but of the types of the individual arguments (which is something I learned only last week: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78080) -
core-ci voted on patch set 3 V +1 03/16/23, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39044
-
Oliver Klee voted on patch set 3 V +1 CR +1 03/16/23, 09:30
-
Christian Kuhn commented on patch set 3 CR -1 03/16/23, 09:56
reviewing. -
Christian Kuhn commented on patch set 3 03/16/23, 10:01
I think at least a couple of these cases can be simplified: withConsecutive() can be directly switched to willReturnOnCensecutiveCalls() quite often, avoiding the more complex callback. I did that in Fluid standalone recently. See https://github.com/TYPO3/Fluid/commit/a2bf1ba5f3c7078e70136bc60efad23b68bc4ebf#diff-c29e663c9847d0a180423c0a2f8270b39b51f2fd8a56d2816479dc0abdec35cdR114 for an example, and search for more willReturnOnCensecutiveCalls() in this patch. Could you give this patch a second look to see if we could simplify some of these constructs in this regard, maybe? -
Christian Kuhn commented on patch set 3 V +1 CR +1 03/20/23, 16:56
talked with torben about this one: it's fine ... i mixed up some details in fluid standalone and fixed them again. -
Christian Kuhn commented on patch set 3 03/20/23, 16:56
Reply
Done -
Christian Kuhn voted on patch set 3 V +2 CR +2 03/20/23, 16:56
-
Christian Kuhn merged patch set 4 03/20/23, 16:56
PaletteAndSingleContainerTest.php:77