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