[TYPO3-core] RFC #10411: sqlparser is not able to parse more than 1 join

Oliver Klee typo3-german-02 at oliverklee.de
Mon Oct 26 12:57:01 CET 2009


Hi,

Xavier Perseguers schrieb:
> Question: what is the "politic" of adding visibility modifiers
> (public/private/protected) to existing classes of t3lib? Because unit
> tests should only cover public methods, not internals. I would like to
> first add as many "public" and "protected" as possible and then/in
> parallel create unit tests. I guess nothing can be made private as it is
> extended by DBAL and for sure used there (I did not yet analyze all lines).

If it's expected (or already) used from the outside, make it public. If
it's more or less private (or expected to be used in subclasses), make
it protected. (The TYPO3 core doesn't use "real" private modifiers.)

For protected functions that are intended to be used in subclasses, I
strongly recommend to write unit tests. You can test those functions by
creating a subclass (either a real class or using eval) that has public
functions that redirect to the protected functions of the same name in
the parent class.


Oliver


More information about the TYPO3-team-core mailing list