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

Change subject: Merge branch 'master' into deployment
......................................................................


Merge branch 'master' into deployment

And delete tests

ed9a8c6 Add test for retry exception
bb9bf83 Fix Adyen audit downloads

Change-Id: I946584726bc472c6cab7ba03906716125f80e1c1
---
D PaymentProviders/Adyen/Tests/phpunit/ReportAvailableTest.php
D PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
2 files changed, 0 insertions(+), 99 deletions(-)

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



diff --git a/PaymentProviders/Adyen/Tests/phpunit/ReportAvailableTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/ReportAvailableTest.php
deleted file mode 100644
index d6ed607..0000000
--- a/PaymentProviders/Adyen/Tests/phpunit/ReportAvailableTest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-namespace SmashPig\PaymentProviders\Adyen\Tests;
-
-use PHPQueue\Interfaces\FifoQueueStore;
-use SmashPig\Core\Configuration;
-use SmashPig\Core\Context;
-use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
-use SmashPig\Core\UtcDate;
-use SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\ReportAvailable;
-use SmashPig\Tests\BaseSmashPigUnitTestCase;
-
-class ReportAvailableTest extends BaseSmashPigUnitTestCase {
-       /**
-        * @var Configuration
-        */
-       protected $config;
-
-       /**
-        * @var FifoQueueStore
-        */
-       protected $jobQueue;
-
-       public function setUp() {
-               parent::setUp();
-               $this->config = 
AdyenTestConfiguration::createWithSuccessfulApi();
-               Context::initWithLogger( $this->config );
-               $this->jobQueue = BaseQueueConsumer::getQueue( 'jobs-adyen' );
-               $this->jobQueue->createTable( 'jobs-adyen' );
-       }
-
-       public function testReportAvailable() {
-               $filename = 'settlement_detail_report_2016_10_13.csv';
-               $account = 'WikimediaTest';
-               $url = 
"https://example.com/reports/download/MerchantAccount/$account/$filename";;
-               $reportAvailable = new ReportAvailable();
-
-               $reportAvailable->correlationId = 'adyen-' . mt_rand();
-               $reportAvailable->merchantAccountCode = $account;
-               $reportAvailable->merchantReference = mt_rand();
-               $reportAvailable->pspReference = $filename;
-               $reportAvailable->reason = $url;
-               $reportAvailable->eventDate = '2016-10-14T12:06:20.496+02:00';
-
-               $reportAvailable->runActionChain();
-
-               $job = $this->jobQueue->pop();
-
-               $now = UtcDate::getUtcTimestamp();
-               $diff = abs( $job['source_enqueued_time'] ) - $now;
-               $this->assertTrue( $diff < 60, 'Odd enqueued time' );
-               $unsetFields = array(
-                       'source_enqueued_time', 'source_host', 'source_run_id',
-                       'source_version', 'propertiesExcludedFromExport',
-                       'propertiesExportedAsKeys',
-               );
-               foreach ( $unsetFields as $fieldName ) {
-                       unset( $job[$fieldName] );
-               }
-               $expected = array(
-                       'php-message-class' => 
'SmashPig\PaymentProviders\Adyen\Jobs\DownloadReportJob',
-                       'reportUrl' => $url,
-                       'account' => $account,
-                       'source_name' => 'SmashPig',
-                       'source_type' => 'listener',
-                       'correlationId' => '',
-                       'gateway' => 'adyen',
-               );
-               $this->assertEquals( $expected, $job );
-       }
-
-}
diff --git a/PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
deleted file mode 100644
index d2c7dd8..0000000
--- a/PaymentProviders/Adyen/Tests/phpunit/RequeueMessageTest.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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/316009
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I946584726bc472c6cab7ba03906716125f80e1c1
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <eeggles...@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