[TYPO3-core] RFC #10220: Feature: Get some unit tests for the core

Francois Suter fsuter at cobweb.ch
Fri Jan 23 13:44:57 CET 2009


Hi,

> I step a little bit deeper an found the reason for this issue.
> The $GLOBALS['TT'] Array was not initialized in 
> T3Root\typo3\sysext\cms\tslib\class.tslib_fe.php
> 
> When i add these two lines
> 
> require_once(PATH_t3lib.'class.t3lib_timetrack.php');
> $GLOBALS['TT'] = new t3lib_timeTrack;
> 
> to the file (outside the class), it will be work.

Thanks for digging into this.

> Is this there at the right position or its better to initialize this 
> array at a more central place?

Definitely not :-) When normal FE rendering takes place, $GLOBALS['TT'] 
is defined. The phpunit extension mentions this "simple FE environment" 
which I take it means that it creates its own instance of tslib_fe, but 
apparently fails to create necessary instances of other classes. So the 
right is somewhere inside phpunit, before tslib_fe is instantiated.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-team-core mailing list