From 2b87073b305f6375a409fcac421c8bb1cc6f94b0 Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 3 Aug 2020 11:24:07 +1200 Subject: [PATCH] [Test fix] We might need this to ensure really quick test runs don't fail --- tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php index 8e89b2c7c6fa..269e3d519dbc 100644 --- a/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php +++ b/tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php @@ -113,7 +113,8 @@ public function testIPNPaymentRecurNoReceipt() { $contributionRecur = $this->callAPISuccessGetSingle('ContributionRecur', ['id' => $this->_contributionRecurID]); $processor_id = $contributionRecur['processor_id']; $this->assertEquals('Pending', CRM_Core_PseudoConstant::getName('CRM_Contribute_BAO_Contribution', 'contribution_status_id', $contributionRecur['contribution_status_id'])); - // Process the initial one. + // Process the initial one after a second's break to ensure modified date really is later. + sleep(1); $IPN = new CRM_Core_Payment_AuthorizeNetIPN( $this->getRecurTransaction(['x_subscription_id' => $processor_id]) );