diff --git a/tests/unit/Moment/MomentBritishEnglishLocaleTest.php b/tests/unit/Moment/MomentBritishEnglishLocaleTest.php index 5de9a3e..a2f19f1 100644 --- a/tests/unit/Moment/MomentBritishEnglishLocaleTest.php +++ b/tests/unit/Moment/MomentBritishEnglishLocaleTest.php @@ -15,7 +15,7 @@ public function setUp(): void Moment::setLocale('en_GB'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -39,7 +39,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -68,7 +68,7 @@ public function testMonthNames() } } - public function testFormat() + public function testFormat(): void { $a = array( array('l, d F Y, G:i:s', 'Saturday, 12 June 2010, 22:00:00'), @@ -105,7 +105,7 @@ public function testFormat() // } // } - public function testOrdinalsFormat() + public function testOrdinalsFormat(): void { $moment = new Moment('2010-06-02T00:00:00+0000'); self::assertEquals('2nd', $moment->format('jS')); @@ -113,7 +113,7 @@ public function testOrdinalsFormat() self::assertEquals('12th', $moment->format('jS')); } - public function testRelative() + public function testRelative(): void { Moment::setLocale('en_GB'); diff --git a/tests/unit/Moment/MomentCanadianEnglishLocaleTest.php b/tests/unit/Moment/MomentCanadianEnglishLocaleTest.php index 16475b2..e28074d 100644 --- a/tests/unit/Moment/MomentCanadianEnglishLocaleTest.php +++ b/tests/unit/Moment/MomentCanadianEnglishLocaleTest.php @@ -24,7 +24,7 @@ public function setUp(): void Moment::setLocale('en_CA'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -48,7 +48,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -77,7 +77,7 @@ public function testMonthNames() } } - public function testFormat() + public function testFormat(): void { $a = array( array('l, d F Y, G:i:s', 'Saturday, 12 June 2010, 22:00:00'), @@ -93,7 +93,7 @@ public function testFormat() } } - public function testCustomLocaleFormat() + public function testCustomLocaleFormat(): void { $a = array( array('LT', '10:00 PM',), @@ -114,7 +114,7 @@ public function testCustomLocaleFormat() } } - public function testOrdinalsFormat() + public function testOrdinalsFormat(): void { $moment = new Moment('2010-06-02T00:00:00+0000'); self::assertEquals('2nd', $moment->format('jS')); @@ -122,7 +122,7 @@ public function testOrdinalsFormat() self::assertEquals('12th', $moment->format('jS')); } - public function testRelative() + public function testRelative(): void { $beginningMoment = new Moment('2010-06-12 00:00:00', 'Europe/London'); diff --git a/tests/unit/Moment/MomentCanadianFrenchLocaleTest.php b/tests/unit/Moment/MomentCanadianFrenchLocaleTest.php index dd089a8..f2ccd57 100755 --- a/tests/unit/Moment/MomentCanadianFrenchLocaleTest.php +++ b/tests/unit/Moment/MomentCanadianFrenchLocaleTest.php @@ -23,7 +23,7 @@ public function setUp(): void Moment::setLocale('fr_CA'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -48,7 +48,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -78,7 +78,7 @@ public function testMonthNames() } } - public function testFormat() + public function testFormat(): void { $a = array( array('l, F d Y, g:i:s a', 'dimanche, février 14 2010, 3:25:50 pm'), @@ -94,7 +94,7 @@ public function testFormat() } } - public function testOrdinalsFormat() + public function testOrdinalsFormat(): void { $moment = new Moment('2010-06-02T00:00:00+0000'); self::assertEquals('2', $moment->format('jS')); @@ -102,7 +102,7 @@ public function testOrdinalsFormat() self::assertEquals('1er', $moment->format('jS')); } - public function testRelative() + public function testRelative(): void { $beginningMoment = new Moment('2015-06-14 20:46:22', 'Europe/Berlin'); $endMoment = new Moment('2015-06-14 20:48:32', 'Europe/Berlin'); diff --git a/tests/unit/Moment/MomentEsperantoLocaleTest.php b/tests/unit/Moment/MomentEsperantoLocaleTest.php index c4c67b5..bdf2fac 100644 --- a/tests/unit/Moment/MomentEsperantoLocaleTest.php +++ b/tests/unit/Moment/MomentEsperantoLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('eo'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -35,7 +35,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -64,7 +64,7 @@ public function testMonthNames() } } - public function testFormat() + public function testFormat(): void { $targetDate = new Moment('2010-06-09 15:25:50'); $formats = array( @@ -82,7 +82,7 @@ public function testFormat() } } - public function _testRelative() + public function _testRelative(): void { $beginningMoment = new Moment('2015-06-14 20:46:22', 'Europe/Berlin'); $endMoment = new Moment('2015-06-14 20:48:32', 'Europe/Berlin'); @@ -90,7 +90,7 @@ public function _testRelative() self::assertEquals('antaŭ 2 minutoj', $beginningMoment->from($endMoment)->getRelative()); } - public function testRelative() + public function testRelative(): void { $tz = 'Europe/Berlin'; $beginningMoment = new Moment('2010-06-12 00:00:00', $tz); diff --git a/tests/unit/Moment/MomentFrenchLocaleTest.php b/tests/unit/Moment/MomentFrenchLocaleTest.php index 8ac83fd..2a7632f 100755 --- a/tests/unit/Moment/MomentFrenchLocaleTest.php +++ b/tests/unit/Moment/MomentFrenchLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('fr_FR'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -36,7 +36,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -66,7 +66,7 @@ public function testMonthNames() } } - public function testFormat() + public function testFormat(): void { $a = array( array('l, F d Y, g:i:s a', 'dimanche, février 14 2010, 3:25:50 pm'), @@ -82,7 +82,7 @@ public function testFormat() } } - public function testRelative() + public function testRelative(): void { $beginningMoment = new Moment('2015-06-14 20:46:22', 'Europe/Berlin'); $endMoment = new Moment('2015-06-14 20:48:32', 'Europe/Berlin'); diff --git a/tests/unit/Moment/MomentGermanLocaleTest.php b/tests/unit/Moment/MomentGermanLocaleTest.php index 8fa6066..dc47734 100755 --- a/tests/unit/Moment/MomentGermanLocaleTest.php +++ b/tests/unit/Moment/MomentGermanLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('de_DE'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -36,7 +36,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -66,7 +66,7 @@ public function testMonthNames() } } - public function testHirbodIssueLocaleDate001() + public function testHirbodIssueLocaleDate001(): void { // @see: https://github.com/fightbulc/moment.php/issues/50 @@ -79,7 +79,7 @@ public function testHirbodIssueLocaleDate001() self::assertEquals('08. März', $moment->format('d. F')); } - public function testHirbodIssueLocaleDate002() + public function testHirbodIssueLocaleDate002(): void { // @see: https://github.com/fightbulc/moment.php/issues/61 @@ -87,7 +87,7 @@ public function testHirbodIssueLocaleDate002() self::assertEquals('03. Dezember', $moment->subtractMonths(1)->format('d. F')); } - public function testMonthsNominativeFallback() + public function testMonthsNominativeFallback(): void { $moment = new Moment('2016-01-03 16:17:07', 'Europe/Berlin'); self::assertEquals('Januar 2016', $moment->format('f Y')); diff --git a/tests/unit/Moment/MomentLatvianLocaleTest.php b/tests/unit/Moment/MomentLatvianLocaleTest.php index 389d994..06819dd 100755 --- a/tests/unit/Moment/MomentLatvianLocaleTest.php +++ b/tests/unit/Moment/MomentLatvianLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('lv_LV'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2017-10-20T00:00:00+0000'; @@ -46,7 +46,7 @@ public function testWeekdayNames() } } - public function testMonthFormat() + public function testMonthFormat(): void { $startingDate = '2016-01-01T00:00:00+0000'; @@ -94,7 +94,7 @@ public function testMonthFormat() } } - public function testDayMonthFormat001() + public function testDayMonthFormat001(): void { $string = '2015-06-14 20:46:22'; $moment = new Moment($string, 'Europe/Riga'); @@ -105,7 +105,7 @@ public function testDayMonthFormat001() self::assertEquals('8 Martā', $moment->format('j F')); } - public function testMinutes() + public function testMinutes(): void { $past = new Moment('2016-01-03 16:17:07', 'Europe/Riga'); @@ -113,7 +113,7 @@ public function testMinutes() self::assertEquals('pirms 17 minūtēm', $relative->getRelative()); } - public function testShowRelativeCalendarDates() + public function testShowRelativeCalendarDates(): void { $past = new Moment('2016-04-10 16:30:07'); self::assertEquals('Pagājušā Svētdiena plkst. 16:30', $past->calendar(true, new Moment('2016-04-12'))); @@ -137,7 +137,7 @@ public function testShowRelativeCalendarDates() self::assertEquals('15.04.2116', $past->calendar(false, new Moment('2017-04-23'))); } - public function testFutureRelative() + public function testFutureRelative(): void { $date = new Moment('2017-01-11 01:00:00'); @@ -153,7 +153,7 @@ public function testFutureRelative() self::assertEquals('pēc 7 gadiem', $date->from('2010-01-11 00:00:00')->getRelative(), 'year'); } - public function testPastRelative() + public function testPastRelative(): void { $date = new Moment('2010-01-11 01:00:00'); self::assertEquals('pirms dažām sekundēm', $date->from('2010-01-11 01:00:01')->getRelative(), 'seconds'); @@ -168,7 +168,7 @@ public function testPastRelative() self::assertEquals('pirms 5 gadiem', $date->from('2015-01-11 01:00:00')->getRelative(), 'year'); } - public function testOrdinalFormat() + public function testOrdinalFormat(): void { $date = new Moment('2017-01-01 01:00:00', 'Europe/Riga'); self::assertEquals('1. Janvāris 2017', $date->format('jS f Y')); diff --git a/tests/unit/Moment/MomentPolishLocaleTest.php b/tests/unit/Moment/MomentPolishLocaleTest.php index fddd9a9..88f7133 100755 --- a/tests/unit/Moment/MomentPolishLocaleTest.php +++ b/tests/unit/Moment/MomentPolishLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('pl_PL'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2016-01-29T00:00:00+0000'; @@ -35,7 +35,7 @@ public function testWeekdayNames() } } - public function testDayMonthFormat001() + public function testDayMonthFormat001(): void { $string = '2015-06-14 20:46:22'; $moment = new Moment($string, 'Europe/Berlin'); @@ -46,13 +46,13 @@ public function testDayMonthFormat001() self::assertEquals('8 marca', $moment->format('j F')); } - public function testDayMonthFormat002() + public function testDayMonthFormat002(): void { $moment = new Moment('2016-01-03 16:17:07', 'Europe/Berlin'); self::assertEquals('3 grudnia', $moment->subtractMonths(1)->format('j F')); } - public function testMonthFormatFN() + public function testMonthFormatFN(): void { $startingDate = '2016-01-01T00:00:00+0000'; @@ -81,7 +81,7 @@ public function testMonthFormatFN() } - public function testMinutes() + public function testMinutes(): void { $past = new Moment('2016-01-03 16:17:07', 'Europe/Berlin'); @@ -95,7 +95,7 @@ public function testMinutes() self::assertEquals('13 minut temu', $relative->getRelative()); } - public function testLastWeekWeekend() + public function testLastWeekWeekend(): void { $past = new Moment('2016-04-10'); self::assertEquals('ostatnia niedziela', $past->calendar(false, new Moment('2016-04-12'))); diff --git a/tests/unit/Moment/MomentRussianLocaleTest.php b/tests/unit/Moment/MomentRussianLocaleTest.php index 480a225..dd6e5d2 100755 --- a/tests/unit/Moment/MomentRussianLocaleTest.php +++ b/tests/unit/Moment/MomentRussianLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('ru_RU'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2016-01-29T00:00:00+0000'; @@ -35,7 +35,7 @@ public function testWeekdayNames() } } - public function testDayMonthFormat001() + public function testDayMonthFormat001(): void { $string = '2015-06-14 20:46:22'; $moment = new Moment($string, 'Europe/Moscow'); @@ -46,13 +46,13 @@ public function testDayMonthFormat001() self::assertEquals('8 марта', $moment->format('j F')); } - public function testDayMonthFormat002() + public function testDayMonthFormat002(): void { $moment = new Moment('2016-01-03 16:17:07', 'Europe/Moscow'); self::assertEquals('3 декабря', $moment->subtractMonths(1)->format('j F')); } - public function testMonthFormatFN() + public function testMonthFormatFN(): void { $startingDate = '2016-01-01T00:00:00+0000'; @@ -81,7 +81,7 @@ public function testMonthFormatFN() } - public function testMinutes() + public function testMinutes(): void { $past = new Moment('2016-01-03 16:17:07', 'Europe/Moscow'); @@ -95,7 +95,7 @@ public function testMinutes() self::assertEquals('13 минут назад', $relative->getRelative()); } - public function testSeconds() + public function testSeconds(): void { $past = new Moment('2017-08-30 20:49:30', 'Europe/Samara'); @@ -109,7 +109,7 @@ public function testSeconds() self::assertEquals('5 секунд назад', $relative->getRelative()); } - public function testLastWeekWeekend() + public function testLastWeekWeekend(): void { $past = new Moment('2016-04-10 16:30:07'); self::assertEquals('воскресенье в 16:30', $past->calendar(true, new Moment('2016-04-12'))); @@ -136,7 +136,7 @@ public function testLastWeekWeekend() self::assertEquals('суббота', $past->calendar(false, new Moment('2016-04-18'))); } - public function testFutureRelative() + public function testFutureRelative(): void { $date = new Moment('2017-01-11 01:00:00'); @@ -150,7 +150,7 @@ public function testFutureRelative() } - public function testOrdinalFormat() + public function testOrdinalFormat(): void { $date = new Moment('2017-01-01 01:00:00'); self::assertEquals('1е января 2017', $date->format('jS F Y')); diff --git a/tests/unit/Moment/MomentTurkishLocaleTest.php b/tests/unit/Moment/MomentTurkishLocaleTest.php index 864a4d1..f73640e 100755 --- a/tests/unit/Moment/MomentTurkishLocaleTest.php +++ b/tests/unit/Moment/MomentTurkishLocaleTest.php @@ -16,7 +16,7 @@ public function setUp(): void Moment::setLocale('tr_TR'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -39,7 +39,7 @@ public function testWeekdayNames() } } - public function testMonthNames() + public function testMonthNames(): void { $startingDate = '2015-01-04T00:00:00+0000'; @@ -68,7 +68,7 @@ public function testMonthNames() } } - public function testFormat() + public function testFormat(): void { $a = array( array('l, F d Y, g:i:s a', 'Pazar, Şubat 14 2010, 3:25:50 pm'), @@ -84,7 +84,7 @@ public function testFormat() } } - public function testRelative() + public function testRelative(): void { $beginningMoment = new Moment('2015-06-14 20:46:22', 'Europe/Istanbul'); $endMoment = new Moment('2015-06-14 20:48:32', 'Europe/Istanbul'); @@ -92,7 +92,7 @@ public function testRelative() self::assertEquals('2 dakika önce', $beginningMoment->from($endMoment)->getRelative()); } - public function testMinutes() + public function testMinutes(): void { $past = new Moment('2016-01-03 16:17:07', 'Europe/Kiev'); @@ -106,7 +106,7 @@ public function testMinutes() self::assertEquals('13 dakika önce', $relative->getRelative()); } - public function testLastWeekWeekend() + public function testLastWeekWeekend(): void { $past = new Moment('2016-04-10 16:30:07'); self::assertEquals('Geçen hafta Pazar 16:30', $past->calendar(true, new Moment('2016-04-12'))); diff --git a/tests/unit/Moment/MomentUkrainianLocaleTest.php b/tests/unit/Moment/MomentUkrainianLocaleTest.php index 15c26f2..34b7b41 100755 --- a/tests/unit/Moment/MomentUkrainianLocaleTest.php +++ b/tests/unit/Moment/MomentUkrainianLocaleTest.php @@ -11,7 +11,7 @@ public function setUp(): void Moment::setLocale('uk_UA'); } - public function testWeekdayNames() + public function testWeekdayNames(): void { $startingDate = '2016-01-29T00:00:00+0000'; @@ -35,7 +35,7 @@ public function testWeekdayNames() } } - public function testDayMonthFormat001() + public function testDayMonthFormat001(): void { $string = '2015-06-14 20:46:22'; $moment = new Moment($string, 'Europe/Kiev'); @@ -46,13 +46,13 @@ public function testDayMonthFormat001() self::assertEquals('8 березня', $moment->format('j F')); } - public function testDayMonthFormat002() + public function testDayMonthFormat002(): void { $moment = new Moment('2016-01-03 16:17:07', 'Europe/Kiev'); self::assertEquals('3 грудня', $moment->subtractMonths(1)->format('j F')); } - public function testMonthFormatFN() + public function testMonthFormatFN(): void { $startingDate = '2016-01-01T00:00:00+0000'; @@ -81,7 +81,7 @@ public function testMonthFormatFN() } - public function testMinutes() + public function testMinutes(): void { $past = new Moment('2016-01-03 16:17:07', 'Europe/Kiev'); @@ -95,7 +95,7 @@ public function testMinutes() self::assertEquals('13 хвилин тому', $relative->getRelative()); } - public function testLastWeekWeekend() + public function testLastWeekWeekend(): void { $past = new Moment('2016-04-10 16:30:07'); self::assertEquals('неділя о 16:30', $past->calendar(true, new Moment('2016-04-12')));