public function test_getLabel() { $period = new Piwik_Period_Day(Piwik_Date::today()); $label = $period->getLabel(); $this->assertTrue(is_string($label) && !empty($label)); $period = new Piwik_Period_Week(Piwik_Date::today()); $label = $period->getLabel(); $this->assertTrue(is_string($label) && !empty($label)); $period = new Piwik_Period_Month(Piwik_Date::today()); $label = $period->getLabel(); $this->assertTrue(is_string($label) && !empty($label)); $period = new Piwik_Period_Year(Piwik_Date::today()); $label = $period->getLabel(); $this->assertTrue(is_string($label) && !empty($label)); }
/** * @group Core * @group Period */ public function testGetLabel() { $period = new Piwik_Period_Day(Piwik_Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); $period = new Piwik_Period_Week(Piwik_Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); $period = new Piwik_Period_Month(Piwik_Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); $period = new Piwik_Period_Year(Piwik_Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); }