Skip to content

Commit

Permalink
Increase uniqueness in testSingleNowDates
Browse files Browse the repository at this point in the history
Reduce instances of
AuthorizeNet failed for unknown reason.E00012: You have submitted a duplicate of Subscription 5642898. A duplicate subscription will not be created
  • Loading branch information
eileenmcnaughton committed Feb 26, 2019
1 parent 70f6eb8 commit d399614
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/phpunit/CRM/Core/Payment/AuthorizeNetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function tearDown() {
* 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);

Expand Down Expand Up @@ -145,7 +145,7 @@ public function testCreateSingleNowDated() {
'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,
Expand Down

0 comments on commit d399614

Please sign in to comment.