/** * @param Time $other * @return bool */ public function isBefore(Time $other) { return $this->toInt() < $other->toInt(); }
/** * @dataProvider provideIsAfter * @param string $firstTime * @param string $secondTime * @param bool $isAfter */ public function testIsAfter($firstTime, $secondTime, $isAfter) { $first = Time::fromString($firstTime); $second = Time::fromString($secondTime); $this->assertEquals($isAfter, $first->isAfter($second)); }