Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Willem Stuursma committed Apr 22, 2015
1 parent 6792b9f commit 9657b89
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/apiUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,13 @@ public function testCreatePaymentWorksCorrectly ()
$this->assertEquals("Order #1225", $payment->description);
$this->assertNull($payment->method);
$this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime);

$this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status);
$this->assertTrue($payment->isOpen());
$this->assertFalse($payment->isPaid());
$this->assertFalse($payment->isExpired());
$this->assertFalse($payment->isCancelled());

$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl());
$this->assertNull($payment->metadata);
}
Expand Down Expand Up @@ -137,8 +142,13 @@ public function testCreateRefundWorksCorrectly ()
$this->assertEquals(Mollie_API_Object_Method::IDEAL, $payment->method);
$this->assertEquals("2014-09-15T09:24:39.0Z", $payment->createdDatetime);
$this->assertEquals(Mollie_API_Object_Payment::STATUS_REFUNDED, $payment->status);

$this->assertFalse($payment->isOpen());
$this->assertFalse($payment->isExpired());
$this->assertFalse($payment->isCancelled());
$this->assertTrue($payment->isPaid());
$this->assertTrue($payment->isRefunded());

$this->assertNull($payment->metadata);
}

Expand Down Expand Up @@ -176,7 +186,12 @@ public function testGetPaymentWorksCorrectly ()
$this->assertNull($payment->method);
$this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime);
$this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status);

$this->assertTrue($payment->isOpen());
$this->assertFalse($payment->isPaid());
$this->assertFalse($payment->isExpired());
$this->assertFalse($payment->isCancelled());

$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl());
$this->assertNull($payment->metadata);
}
Expand Down Expand Up @@ -214,7 +229,10 @@ public function testGetPaymentsWorksCorrectly ()
$this->assertNull($payment->method);
$this->assertEquals("2013-11-21T09:57:08.0Z", $payment->createdDatetime);
$this->assertEquals(Mollie_API_Object_Payment::STATUS_OPEN, $payment->status);
$this->assertTrue($payment->isOpen());
$this->assertFalse($payment->isPaid());
$this->assertFalse($payment->isExpired());
$this->assertFalse($payment->isCancelled());
$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl());
$this->assertNull($payment->metadata);
}
Expand Down

0 comments on commit 9657b89

Please sign in to comment.