Пример #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';
 }
Пример #2
0
 /**
  * @covers ::__construct
  * @covers ::getDays
  * @dataProvider dataConstruct
  */
 public function testConstruct($input, $result)
 {
     $days = new Days($input);
     $this->assertSame($result, $days->getDays());
 }