Skip to content

Commit

Permalink
Purchase request unit test get data improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis-HolidayMedia committed Jun 10, 2016
1 parent f27f7b0 commit 4c01d7c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/Message/PurchaseRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,30 @@ public function setUp()

public function testGetData()
{
$this->request->initialize(array(
'websiteKey' => 'web',
'secretKey' => 'secret',
'amount' => '12.00',
'currency' => 'EUR',
'testMode' => true,
'transactionId' => 13,
'returnUrl' => 'https://www.example.com/return',
'cancelUrl' => 'https://www.example.com/cancel',
'culture' => 'nl-NL',
'paymentMethod' => 'mastercard',
'issuer' => 'RABONL2U',
));

$data = $this->request->getData();

$this->assertSame('web', $data['Brq_websitekey']);
$this->assertSame('12.00', $data['Brq_amount']);
$this->assertSame('EUR', $data['Brq_currency']);
$this->assertSame(13, $data['Brq_invoicenumber']);
$this->assertSame('https://www.example.com/return', $data['Brq_return']);
$this->assertSame('https://www.example.com/cancel', $data['Brq_returncancel']);
$this->assertSame('nl-NL', $data['Brq_culture']);

$this->assertNotContains('Brq_payment_method', $data);
$this->assertNotContains('Brq_service_ideal_issuer', $data);
$this->assertNotContains('Brq_requestedservices', $data);
Expand Down

0 comments on commit 4c01d7c

Please sign in to comment.