[BUGFIX] Tests: Improve mocking in IconUtilityTest 20/28220/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 10 Mar 2014 13:26:42 +0000 (14:26 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 10 Mar 2014 13:52:31 +0000 (14:52 +0100)
commitd413b2f6a9b8a58e301a8cf0e485769cb52276c0
tree07bb19332b69f28f81c2a3b54bd24456d35a4069
parent9c35421bff3d0055bcca5b38e8d9cfdfcc13bb25
[BUGFIX] Tests: Improve mocking in IconUtilityTest

The IconUtility tests depend on initialized $GLOBALS['TBE_STYLES']
and sometimes on initialized $GLOBALS['TCA']. This dependency is
removed by properly setting up needed arrays now, this also makes
the tests more obvious and easier to understand.
Additionally, the static cache property introduced with #56110 now
uses late static binding, enabling the tests to extend the class
and route any static cache changes to an test internal overlay
class to not pollute the static property of the base class.

Change-Id: I01166058da051a26d7aa2df315858468828ed346
Resolves: #56725
Related: #51436
Related: #56110
Releases: 6.2
Reviewed-on: https://review.typo3.org/28220
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php