IconUtility::getSpriteIcon() is used heavily in many parts of the backend Treeview, page and list to name a few areas.
Most of the calls (279) use just the first parameter: $iconName
Many callers (135) use more parameters.
The calls with just the one parameter can be cached, preventing rendering the same code over and over again (in list mode and page tree for example).
[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.
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters