[TYPO3-v4] t3lib_utility_* only static?
Stefan Galinski
stefan.galinski at gmail.com
Wed Jul 20 22:37:16 CEST 2011
Xavier Perseguers wrote:
> Hi Stefan,
>
>> Please be aware that this step will be a real problem for any further
>> unit tests and maybe also the existing ones. Unfortunately it's horrible
>> to test code that relies on static method calls, because they cannot be
>> mocked. Sure
>
> I guess you misunderstood the post of Steffen G. He actually would like
> to *avoid* having the new Http class be put within t3lib_utility_* because
>
> 1) this new class is not static (thus good for unit testing)
> 2) current classes within t3lib_utility_* are static
>
> and thus we wanted to ask first if it wouldn't be better to put it
> somewhere else within t3lib_* but not within t3lib_utility_*
>
> Hope this helps clarifying the concept.
>
> Regards
>
Hi,
Indeed I completely misunderstood his indention. Sorry for that...
However I would also prefer to not move such classes inside the utility
directory. How about adding such new non-static classes with service
character inside a t3lib_services_* "namespace"? IMHO this would perfectly
fit the structure in current extbase extensions.
--
Stefan Galinski
More information about the TYPO3-project-v4
mailing list