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