[TYPO3-core] RFC #14984: Feature: Add the example unit tests from the T3DD10 unit testing workshop

Christian Kuhn lolli at schwarzbu.ch
Tue Jul 6 23:35:27 CEST 2010


Hey,

Oliver Klee wrote:
> Problem:
> The example unit tests from the T3DD10 unit testing workshop (and some
> from the T3CON09 workshop) aren't part of the Core tests yet.

+1 on reading and testing

Just a (generic) questions:
* Shouldn't we better use t3lib_div::makeInstance() instead of "new" in 
unit tests? This is eg. used in the fixture for t3lib_arrayBrowserTest, 
and some other core tests already use makeInstance(). I'm unsure about 
that: On the one hand new "might" break if the autoloader gets changed 
somehow, otoh makeInstance() "might" produce problems (with fixtures) if 
a class starts to implement t3lib_Singleton ...

BTW: We relaxed the CGL "80 char per line" rule a bit, thus I'd like to 
stuff the method signature into one line in divTest 
calcPriorityCalculatesBasicArithmeticOperation() (not in the 
assertions), will do so before commit.

Great unit tests to show options of phpunit!

Now missing another +1 on reading. Anyone?

Thanks
Christian


More information about the TYPO3-team-core mailing list