[TYPO3-core] RFC #16267 Feature: Add functions to provide mocks for makeInstance

Christian Kuhn lolli at schwarzbu.ch
Sat Nov 27 00:22:07 CET 2010


Hey,

On 11/26/2010 11:42 PM, Oliver Klee wrote:
> Am 26.11.2010 20:50, schrieb Christian Kuhn:
>> +1 on reading and testing, if you assure that purgeInstances() does not
>> harm the phpunit environment if called within tearDown(). On the first
>> call several registered singleton instances like template and cache
>> classes will be thrown away. Is this ok? Are you sure about that?
>
> Yes, this is okay. The phpunit BE module and CLI runner does not use any
> singletons, and this patch didn't break the Core tests any more than
> they already are broken. Good unit tests need to set up their own cache
> etc. anyway when they need it.

Ok, +1 on reading and testing then.

BTW: I'm counting 7 failing tests (3 in matchcondition and 4 in pdo). 
Anyone wants to dig into?

>> - Swap 'static public' to 'public static'
>
> I had used "static public" because I had read this somewhere in the CGL,
> but I'm not quite sure whether this might have been a bug in the CGL.

I'm actually not aware of a specific rule for this, 'public static' is 
used everywhere else, so I adapted it. Anyway, this is just cosmetic ;)

Regards
Christian


More information about the TYPO3-team-core mailing list