Skip to content
Snippets Groups Projects
Commit c0f322ad authored by Benjamin Mack's avatar Benjamin Mack Committed by Andreas Fernandez
Browse files

[BUGFIX] Rename setLocale() in DateTimeViewHelperTest

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: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
parent 4fb8c559
Branches
Tags
No related merge requests found
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment