Exemple #1
0
 function test_range_year_last1()
 {
     $range = new Piwik_Period_Range('year', 'last1');
     $currentYear = new Piwik_Period_Year(Piwik_Date::today());
     $this->assertEqual($range->getNumberOfSubperiods(), 1);
     $this->assertEqual($range->isFinished(), false);
     $this->assertEqual($range->toString(), array($currentYear->toString()));
 }