From: eileen Date: Tue, 19 Feb 2019 23:07:26 +0000 (+1300) Subject: Authorizenet test - reduce chance of intermittent fails X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=33f417bb392b787bde4d3131f2f70bad7aef2b94;p=civicrm-core.git Authorizenet test - reduce chance of intermittent fails I just saw this fail https://developer.authorize.net/api/reference/responseCodes.html?code=E00012 It seems we've already added uniqueness but we still hit a fail. Hopefully the timestamp nature of uniqid + adding an extra degree of randomness will eliminate. Also removed some deprecated params --- diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php index e7f68600ef..a7985323b3 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php @@ -238,7 +238,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { 'cvv2' => 123, 'credit_card_exp_date' => array( 'M' => 11, - 'Y' => 2019, + 'Y' => 2022, ), 'credit_card_type' => 'Visa', 'is_recur' => 1, @@ -261,7 +261,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { 'state_province-5' => 'IL', 'billing_country-5' => 'US', 'country-5' => 'US', - 'year' => 2019, + 'year' => 2022, 'month' => 10, 'ip_address' => '127.0.0.1', 'amount' => 70, @@ -281,18 +281,15 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { 'first_name' => $firstName, 'middle_name' => 'bob', 'last_name' => $lastName, - 'street_address' => '8 Hobbiton Road', + 'street_address' => '8 Hobbiton Road' . uniqid(), 'city' => 'The Shire', 'state_province' => 'IL', 'postal_code' => 5010, 'country' => 'US', - 'contributionType_name' => 'My precious', - 'contributionType_accounting_code' => '', 'contributionPageID' => '', 'email' => "{$firstName}.{$lastName}@example.com", 'contactID' => $contactId, 'contributionID' => $contribution['id'], - 'contributionTypeID' => $this->_financialTypeId, 'contributionRecurID' => $recur->id, );