[TASK] Replace setLocale() in tests with phpunit backup functionality 34/50334/7
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 24 Oct 2016 11:14:10 +0000 (13:14 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 25 Oct 2016 14:32:24 +0000 (16:32 +0200)
commit8f997b6de9e227885859740895cfe261705801dd
treebe8086f05978ebd95256b4e0a980f8c014a45ec5
parente696b442e082c20b15b2d7623e6160489d6fab4d
[TASK] Replace setLocale() in tests with phpunit backup functionality

There is a phpunit shipped functionality to reliably fiddle with locale
settings and have the valid settings back afterwards.
This funcionality was not used in core unit tests yet, so it is
introduced now.

In this process, some sanitizing to prevent tests from fail due to
non existent locales on a certain system is added.

Resolves: #78387
Releases: master
Change-Id: Iebd9b9251590283e6d2889db09a62a31a595fdb3
Reviewed-on: https://review.typo3.org/50334
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
typo3/sysext/form/Tests/Unit/Validator/FloatValidatorTest.php
typo3/sysext/form/Tests/Unit/Validator/IntegerValidatorTest.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php