/** * @covers ::add */ public function testAdd() { $day1 = new Days(7); $day2 = new Days(13); $expected = new Days(20); $this->assertEquals($expected, $day1->add($day2)); }
/** * @param DaysSpan $span * @return self */ public function add(DaysSpan $span) { $this->from->add($span->from); $this->to->add($span->to); return $this; }