Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 /**
  * @group Core
  */
 public function testGetPrettyString()
 {
     $month = new Day(Date::factory('2024-10-09'));
     $shouldBe = '2024-10-09';
     $this->assertEquals($shouldBe, $month->getPrettyString());
 }