public function testGetTimePast() { $time = new \DateTime(); $interval = new \DateInterval('P3Y1M2D'); $interval->invert = 1; $time->add($interval); $this->assertEquals($time->getTimestamp(), FieldDef::past()->days(2)->months(1)->years(3)->get()); $this->assertEquals($time, FieldDef::past()->days(2)->months(1)->years(3)->get(DateIntervalHelper::DATE_TIME)); $this->assertEquals($time->format('d-m-y'), FieldDef::past()->days(2)->months(1)->years(3)->get(DateIntervalHelper::STRING)); }