[BUGFIX] Rename setLocale() in DateTimeViewHelperTest 10/42110/2
authorBenjamin Mack <benni@typo3.org>
Wed, 29 Jul 2015 17:36:02 +0000 (19:36 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 29 Jul 2015 17:48:06 +0000 (19:48 +0200)
The method setLocale($locale) in the DateTimeViewHelperTest
was implemented to test against several locales. However,
as there is a setLocale() in the parent class from PHPUnit that
does not take any parameter, PHP7 throws a warning as the
subclass does not have the same method signature as the parent
class.

The patch changes the method to be named differently thus,
solving the method signature conflict inside the test.

Resolves: #67092
Releases: 6.2, master
Change-Id: Ia05d90c64a3a8e2fc599935d2435192392e5a667
Reviewed-on: http://review.typo3.org/42110
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php

index c686bf3..74a6c4f 100644 (file)
@@ -275,14 +275,14 @@ class DateViewHelperTest extends UnitTestCase {
                if (!setlocale(LC_COLLATE, $locale)) {
                        $this->markTestSkipped('Locale ' . $locale . ' is not available.');
                }
-               $this->setLocale($locale);
+               $this->setCustomLocale($locale);
                $this->assertEquals($expected, $this->subject->render($timestamp, $format));
        }
 
        /**
         * @param string $locale
         */
-       protected function setLocale($locale) {
+       protected function setCustomLocale($locale) {
                setlocale(LC_CTYPE, $locale);
                setlocale(LC_MONETARY, $locale);
                setlocale(LC_TIME, $locale);