public function testIsShortTerm() { $now = new \DateTime(); $this->lot->getInitial()->setDate($now->modify('-1 month')); $this->assertTrue($this->lot->isShortTerm()); $now = new \DateTime(); $this->lot->getInitial()->setDate($now->modify('-10 year -1 month')); $this->assertFalse($this->lot->isShortTerm()); $this->lot->setStatus(Lot::LOT_INITIAL); $now = new \DateTime(); $this->lot->setDate($now->modify('-1 month')); $this->assertTrue($this->lot->isShortTerm()); $now = new \DateTime(); $this->lot->setDate($now->modify('-1 year -1 month')); $this->assertFalse($this->lot->isShortTerm()); }