public function testGetLabel() { $period = new Day(Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); $period = new Week(Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); $period = new Month(Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); $period = new Year(Date::today()); $label = $period->getLabel(); $this->assertInternalType('string', $label); $this->assertNotEmpty($label); }
/** * @group Core */ public function testGetPrettyString() { $month = new Day(Date::factory('2024-10-09')); $shouldBe = '2024-10-09'; $this->assertEquals($shouldBe, $month->getPrettyString()); }