public function testIsExpiredDueToExpirationDate() { $payment = new Payment($this->getInstruction(), 123); $this->assertFalse($payment->isExpired()); $payment->setExpirationDate(new \DateTime('yesterday')); $this->assertTrue($payment->isExpired()); $payment->setExpirationDate(new \DateTime('tomorrow')); $this->assertFalse($payment->isExpired()); }