Esempio n. 1
0
 /**
  * @return string
  */
 public function humanize()
 {
     if ($this->from->getDays() == $this->to->getDays()) {
         return $this->from->getDays() . ' days';
     }
     return $this->from->getDays() . ' - ' . $this->to->getDays() . ' days';
 }
Esempio n. 2
0
 /**
  * @covers ::toDateTime
  * @dataProvider dataToDateTime
  */
 public function testToDateTime($input, $start, $result)
 {
     $days = new Days($input);
     $this->assertEquals($result->format('d m Y'), $days->toDateTime($start)->format('d m Y'));
 }