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

Oliver Klee typo3-german-02 at oliverklee.de
Fri Nov 26 23:42:53 CET 2010


Hi,

thanks for the review and the polish!

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.

> - 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.


Oli
-- 
Certified TYPO3 Integrator | TYPO3 Security Team Member


More information about the TYPO3-team-core mailing list