-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Willem Stuursma
committed
May 19, 2015
1 parent
f2aa80c
commit c633e0d
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,4 +255,22 @@ public function testGetPaymentsWorksCorrectly () | |
$this->assertEquals("https://www.mollie.nl/payscreen/pay/d0b0E3EA3v", $payment->getPaymentUrl()); | ||
$this->assertNull($payment->metadata); | ||
} | ||
|
||
public function testMethodsWorksCorrectly () | ||
{ | ||
$this->api->expects($this->once()) | ||
->method("performHttpCall") | ||
->with(Mollie_API_Client::HTTP_GET, "methods?offset=0&count=0&locale=de") | ||
->will($this->returnValue('{"totalCount":4,"offset":0,"count":4,"data":[{"id":"sofort","description":"SOFORT \u00dcberweisung","amount":{"minimum":"0.31","maximum":"5000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/sofort.png","bigger":"https://www.mollie.com/images/payscreen/methods/[email protected]"}},{"id":"ideal","description":"iDEAL","amount":{"minimum":"0.55","maximum":"50000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/ideal.png","bigger":"https://www.mollie.com/images/payscreen/methods/[email protected]"}},{"id":"mistercash","description":"Bancontact/Mister Cash","amount":{"minimum":"0.31","maximum":"10000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/mistercash.png","bigger":"https://www.mollie.com/images/payscreen/methods/[email protected]"}},{"id":"belfius","description":"Belfius Direct Net","amount":{"minimum":"0.31","maximum":"50000.00"},"image":{"normal":"https://www.mollie.com/images/payscreen/methods/belfius.png","bigger":"https://www.mollie.com/images/payscreen/methods/[email protected]"}}]}')); | ||
|
||
$methods = $this->api->methods->all(0, 0, array("locale" => "de")); | ||
|
||
$this->assertCount(4, $methods); | ||
$this->assertInstanceOf("Mollie_API_Object_List", $methods); | ||
|
||
foreach ($methods as $method) | ||
{ | ||
$this->assertInstanceof("Mollie_API_Object_Method", $method); | ||
} | ||
} | ||
} |