[BUGFIX] Remove PHP Error caused by setlocale call
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 3 Feb 2013 19:22:51 +0000 (20:22 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 3 Feb 2013 19:57:14 +0000 (20:57 +0100)
With #44835 the setlocale function is used to reset manipulations
on locale settings during tests. Accidently the array keys were
stored as strings, but should be constants.

Fixes: #45118
Related: #44835
Releases: 6.1, 6.0, 4.7, 4.6, 4.5
Change-Id: I6514d11b97359778a0ee11ec3115d1cbd0caac75
Reviewed-on: https://review.typo3.org/17987
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php

index 4aa5027..c133550 100644 (file)
@@ -33,10 +33,10 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
                parent::setUp();
                // Store all locale categories manipulated in tests for reconstruction in tearDown
                $this->backupLocales = array(
-                       'LC_COLLATE' => setlocale(LC_COLLATE, 0),
-                       'LC_CTYPE' => setlocale(LC_CTYPE, 0),
-                       'LC_MONETARY' => setlocale(LC_MONETARY, 0),
-                       'LC_TIME' => setlocale(LC_MONETARY, 0),
+                       LC_COLLATE => setlocale(LC_COLLATE, 0),
+                       LC_CTYPE => setlocale(LC_CTYPE, 0),
+                       LC_MONETARY => setlocale(LC_MONETARY, 0),
+                       LC_TIME => setlocale(LC_MONETARY, 0),
                );
                $this->arguments['name'] = '';
                $this->arguments['sortByOptionLabel'] = FALSE;