Skip to content

Commit 9657b89

Browse files
author
Willem Stuursma
committed
Update tests
1 parent 6792b9f commit 9657b89

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/apiUnitTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ public function testCreatePaymentWorksCorrectly ()
106106
$this->assertEquals("Order #1225", $payment->description);
107107
$this->assertNull($payment->method);
108108
$this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime);
109+
109110
$this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status);
111+
$this->assertTrue($payment->isOpen());
110112
$this->assertFalse($payment->isPaid());
113+
$this->assertFalse($payment->isExpired());
114+
$this->assertFalse($payment->isCancelled());
115+
111116
$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl());
112117
$this->assertNull($payment->metadata);
113118
}
@@ -137,8 +142,13 @@ public function testCreateRefundWorksCorrectly ()
137142
$this->assertEquals(Mollie_API_Object_Method::IDEAL, $payment->method);
138143
$this->assertEquals("2014-09-15T09:24:39.0Z", $payment->createdDatetime);
139144
$this->assertEquals(Mollie_API_Object_Payment::STATUS_REFUNDED, $payment->status);
145+
146+
$this->assertFalse($payment->isOpen());
147+
$this->assertFalse($payment->isExpired());
148+
$this->assertFalse($payment->isCancelled());
140149
$this->assertTrue($payment->isPaid());
141150
$this->assertTrue($payment->isRefunded());
151+
142152
$this->assertNull($payment->metadata);
143153
}
144154

@@ -176,7 +186,12 @@ public function testGetPaymentWorksCorrectly ()
176186
$this->assertNull($payment->method);
177187
$this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime);
178188
$this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status);
189+
190+
$this->assertTrue($payment->isOpen());
179191
$this->assertFalse($payment->isPaid());
192+
$this->assertFalse($payment->isExpired());
193+
$this->assertFalse($payment->isCancelled());
194+
180195
$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl());
181196
$this->assertNull($payment->metadata);
182197
}
@@ -214,7 +229,10 @@ public function testGetPaymentsWorksCorrectly ()
214229
$this->assertNull($payment->method);
215230
$this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime);
216231
$this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status);
232+
$this->assertTrue($payment->isOpen());
217233
$this->assertFalse($payment->isPaid());
234+
$this->assertFalse($payment->isExpired());
235+
$this->assertFalse($payment->isCancelled());
218236
$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl());
219237
$this->assertNull($payment->metadata);
220238
}

0 commit comments

Comments
 (0)