/** * @group Core * @group Period * @group Period_Range */ public function testGetLocalizedLongString() { Piwik_Translate::getInstance()->loadEnglishTranslation(); $month = new Piwik_Period_Range('range', '2023-05-09,2023-05-21'); $shouldBe = '8 May 23 - 21 May 23'; $this->assertEquals($shouldBe, $month->getLocalizedLongString()); }
function test_InvalidRange_throws() { try { $range = new Piwik_Period_Range('range', '0001-01-01,today'); echo $range->getLocalizedLongString(); $this->fail(); } catch (Exception $e) { $this->pass(); } }