Example #1
0
 /**
  * @group Core
  */
 public function testGetLocalizedLongString()
 {
     Translate::loadEnglishTranslation();
     $year = new Year(Date::factory('2024-10-09'));
     $shouldBe = '2024';
     $this->assertEquals($shouldBe, $year->getLocalizedLongString());
 }
Example #2
0
 /**
  * @group Core
  * @group Year
  * @dataProvider getLocalizedLongStrings
  */
 public function testGetLocalizedLongString($language, $shouldBe)
 {
     StaticContainer::get('Piwik\\Translation\\Translator')->setCurrentLanguage($language);
     $year = new Year(Date::factory('2024-10-09'));
     $this->assertEquals($shouldBe, $year->getLocalizedLongString());
 }