jenkins-bot has submitted this change and it was merged.

Change subject: Add test for retry exception
......................................................................


Add test for retry exception

Change-Id: I37f6426ec46c7885e68acfc93e2e442ebef8e793
---
A PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
1 file changed, 28 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
new file mode 100644
index 0000000..d2c7dd8
--- /dev/null
+++ b/PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
@@ -0,0 +1,28 @@
+<?php namespace SmashPig\PaymentProviders\Adyen\Test;
+
+use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
+use SmashPig\PaymentProviders\Adyen\Jobs\ProcessCaptureRequestJob;
+use SmashPig\Tests\BaseSmashPigUnitTestCase;
+
+/**
+ * Make sure a message that arrives before the pending databases entry gets
+ * written is properly requeued for retry.
+ */
+class RequeueMessageTest extends BaseSmashPigUnitTestCase {
+
+       /**
+        * @expectedException \SmashPig\Core\RetryableException
+        */
+       public function testRequeueMessage() {
+
+               $auth = KeyedOpaqueStorableObject::fromJsonProxy(
+                       
'SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation',
+                       file_get_contents( __DIR__ . '/../Data/auth.json' )
+               );
+
+               $job = ProcessCaptureRequestJob::factory( $auth );
+               $job->execute();
+
+       }
+
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/315897
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I37f6426ec46c7885e68acfc93e2e442ebef8e793
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to