Skip to content

Commit 8a51f68

Browse files
committed
modified failing unit test for cardnumber assertion in testCreateCustomerProfile test
1 parent ecc3ded commit 8a51f68

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/AuthorizeNetCIM_Test.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public function testCreateCustomerProfile()
119119
$this->assertEquals($customerProfile->description, (string)$response->xml->profile->description);
120120
$this->assertEquals($customerProfile->merchantCustomerId, (string)$response->xml->profile->merchantCustomerId);
121121
$this->assertEquals($customerProfile->email, (string)$response->xml->profile->email);
122-
122+
$testPayment = ($response->xml->profile->paymentProfiles[0]->payment->creditCard)?($response->xml->profile->paymentProfiles[0]->payment):
123+
($response->xml->profile->paymentProfiles[1]->payment);
124+
$this->assertEquals(substr($customerProfile->paymentProfiles[0]->payment->creditCard->cardNumber, -4, 4), substr((string)$testPayment->creditCard->cardNumber, -4, 4));
123125
$this->assertTrue($response->isOk());
124126

125127

0 commit comments

Comments
 (0)