Bug #53476

Better mocking of $GLOBALS['LANG']

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

Status:Resolved Start date:2013-11-09
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:easy

Related issues

related to Core - Task #51436: Standalone unit test runner Resolved 2014-02-10
related to Core - Bug #53558: Refactor PageRenderer tests Resolved 2013-11-12

Associated revisions

Revision d7c03b86
Added by Christian Kuhn over 1 year ago

[TASK] Better mocking of $GLOBALS['LANG']

To further remove dependencies in unit tests, some tests are
adapted to correctly mock $GLOBALS['LANG']. The PageRenderer
tests still need adaptions in a separate patch, so the test
bootstrap still initializes the language handling for now.

Change-Id: I5d6a8a0a0fe738fef676fbc637a02fe9700ccee3
Resolves: #53476
Related: #51436
Releases: 6.2
Reviewed-on: https://review.typo3.org/25234
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

Revision ac6599fc
Added by Christian Kuhn over 1 year ago

[TASK] Refactor PageRenderer tests

The existing tests of ext:core/Page/PageRenderer are in fact
functional tests since most of them trigger lots of dependencies
and call the main API method "render()" to check for something.

The patch moves most detail tests to two general functional tests
doing the main work and adds some more functional tests for more
specific cases.
The unit tests are stripped down to those parts that test only single
methods or smaller systems with proper mocking.

In effect, the full unit test suite does no longer depend on
initialization of $GLOBALS['LANG'], it is now removed from unit
test bootstrap.

Change-Id: I9f3f54ba52673e16bfcd303b46755e079d240de6
Resolves: #53558
Related: #51436
Related: #53476
Releases: 6.2
Reviewed-on: https://review.typo3.org/25304
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

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/25234

#2 Updated by Gerrit Code Review over 1 year ago

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

#3 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