From 4b3df504ada568a7be93532be65c5483296887ce Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 26 Feb 2019 19:43:11 +1300 Subject: [PATCH] Increase uniqueness in testSingleNowDates Reduce instances of AuthorizeNet failed for unknown reason.E00012: You have submitted a duplicate of Subscription 5642898. A duplicate subscription will not be created --- tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php index a7985323b3..080a8d720d 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php @@ -53,8 +53,8 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { * Test works but not both due to some form of caching going on in the SmartySingleton */ public function testCreateSingleNowDated() { - $firstName = 'John_' . substr(sha1(rand()), 0, 7); - $lastName = 'Smith_' . substr(sha1(rand()), 0, 7); + $firstName = 'John_' . substr(sha1(rand()), 0, 7) . uniqid(); + $lastName = 'Smith_' . substr(sha1(rand()), 0, 7) . uniqid(); $nameParams = array('first_name' => $firstName, 'last_name' => $lastName); $contactId = $this->individualCreate($nameParams); @@ -145,7 +145,7 @@ class CRM_Core_Payment_AuthorizeNetTest extends CiviUnitTestCase { 'first_name' => $firstName, 'middle_name' => '', 'last_name' => $lastName, - 'street_address' => '8 Hobbiton Road', + 'street_address' => '8 Hobbiton Road' . uniqid(), 'city' => 'The Shire', 'state_province' => 'IL', 'postal_code' => 5010, -- 2.25.1