From 2f5047837b3f02af6cf1e2debd2f61ac24a55ba7 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Wed, 15 Aug 2018 20:22:57 +0200 Subject: [PATCH] Add test for DateHelper::getFullMonthAndDate --- tests/Helper/DateHelperTest.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/Helper/DateHelperTest.php b/tests/Helper/DateHelperTest.php index b9f0c93b98f..c50ae0955ba 100644 --- a/tests/Helper/DateHelperTest.php +++ b/tests/Helper/DateHelperTest.php @@ -222,6 +222,39 @@ public function testGetShortMonthWithUnknownLocale() ); } + public function testGetFullMonthAndDateWithEnglishLocale() + { + $date = '2017-01-22 17:56:03'; + DateHelper::setLocale('en'); + + $this->assertEquals( + 'January 2017', + DateHelper::getFullMonthAndDate($date) + ); + } + + public function testGetFullMonthAndDateWithFrenchLocale() + { + $date = '2017-01-22 17:56:03'; + DateHelper::setLocale('fr'); + + $this->assertEquals( + 'janvier 2017', + DateHelper::getFullMonthAndDate($date) + ); + } + + public function testGetFullMonthAndDateWithUnknownLocale() + { + $date = '2017-01-22 17:56:03'; + DateHelper::setLocale('jp'); + + $this->assertEquals( + 'January 2017', + DateHelper::getFullMonthAndDate($date) + ); + } + public function testGetShortDayWithEnglishLocale() { $date = '2017-01-22 17:56:03';