Bug #56725

Task #51436: Standalone unit test runner

Improve mocking in IconUtilityTest

Added by Christian Kuhn over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2014-03-10
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:Unit/Functional Tests Spent time: -
Target version:6.2.0
TYPO3 Version:6.2 Is Regression:No
PHP Version:5.4 Sprint Focus:
Complexity:medium

Related issues

related to Core - Task #56110: IconUtility::getSpriteIcon() needs a cache Resolved 2014-02-19

Associated revisions

Revision d413b2f6
Added by Christian Kuhn over 1 year ago

[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

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28220

#2 Updated by Christian Kuhn over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF