[TYPO3-core] Add more unit tests to patches
Philipp Gampe
philipp.gampe at typo3.org
Thu May 17 01:28:22 CEST 2012
Hi Christian,
Christian Kuhn wrote:
> It would be great if we could add tests to patches, especially if:
> - They are bugfixes and targeted to be backported to stable branches
> - The code itself is unit testable at all (there are situations in the
> core where it is hardly possible without bigger refactorings)
> - The code that is changed proofed to be fragile
> - The patch fixes a regression
>
> In some areas of the core I'd go so far to say that unit tests are
> mandatory. This is especially true for those central static classes like
> t3lib_div. For me, I'll not merge a patch in t3lib_div & friends that
> doesn't come with a test (if possible).
+1
> From my experience I can say that writing unit tests often improves the
> code quality, makes code more easy to maintain and avoids bugs when
> writing and refactoring things.
+1 because you have to think about it again
> At the moment, we have already plenty of tests in the core and they can
> be used as examples on how to solve own problems. There are examples for
> nifty mocking, for callbacks, for accessible proxies and so on. We also
> have some guys with a high addiction to tests, so please ask if you are
> unsure on how to solve things.
I would be cool to have them all green soon on master:
for typo3:
1616 tests, 2042 assertions, 52 failures, 107 skipped, 0 , 20 errors,
20.441 seconds, 54 MB (56235176 B) memory leaks
for extbase, 2 failures (cli stuff)
fluid just fatals :( (@Process request sets widget configuration)
for index search 1 failure (Local path with abs ref prefix)
others are green
Lets go for green bar feeling!
Cheers
Phil
More information about the TYPO3-team-core
mailing list