Skip to content

Commit e54383a

Browse files
committed
[AIMRefundRequest] Add test when no credit card expiry dates are set
1 parent b24ebe8 commit e54383a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/Message/AIMRefundRequestTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,24 @@ public function testGetData()
2929
$this->assertSame('60O2UZ', $data['x_trans_id']);
3030
$this->assertSame($card['number'], $data['x_card_num']);
3131
$this->assertSame('12.00', $data['x_amount']);
32+
33+
$this->assertArrayHasKey('x_exp_date', $data);
34+
}
35+
36+
public function testRefundWithSimplifiedCard()
37+
{
38+
$simplifiedCard = array(
39+
'firstName' => 'Example',
40+
'lastName' => 'User',
41+
'number' => '1111',
42+
);
43+
44+
$this->request->setCard($simplifiedCard);
45+
46+
$data = $this->request->getData();
47+
48+
$this->assertSame($simplifiedCard['number'], $data['x_card_num']);
49+
50+
$this->assertArrayNotHasKey('x_exp_date', $data);
3251
}
3352
}

0 commit comments

Comments
 (0)