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

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


Merge branch 'master' into deployment

71a57ea Deal with refunds having no txn_type

Change-Id: I386a79b6699315c84ff30c4119e0054e074bd93f
---
D PaymentProviders/PayPal/Tests/config_test.yaml
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
2 files changed, 0 insertions(+), 169 deletions(-)

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



diff --git a/PaymentProviders/PayPal/Tests/config_test.yaml 
b/PaymentProviders/PayPal/Tests/config_test.yaml
deleted file mode 100644
index 3201b85..0000000
--- a/PaymentProviders/PayPal/Tests/config_test.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-<<<<<<< HEAD   (077ffc Merge branch 'master' into deployment)
-=======
-paypal:
-    api:
-        class: SmashPig\PaymentProviders\PayPal\Tests\MockPayPalPaymentsAPI
-
-    data-store:
-        verified:
-            class: PHPQueue\Backend\PDO
-            constructor-parameters:
-                -
-                    connection_string: 'sqlite::memory:'
-                    queue: verified
-
-        jobs-paypal:
-            class: PHPQueue\Backend\PDO
-            constructor-parameters:
-                -
-                    connection_string: 'sqlite::memory:'
-                    queue: jobs-paypal
-
-        recurring:
-            class: PHPQueue\Backend\PDO
-            constructor-parameters:
-                -
-                    connection_string: 'sqlite::memory:'
-                    queue: recurring
-
-        refund:
-            class: PHPQueue\Backend\PDO
-            constructor-parameters:
-                -
-                    connection_string: 'sqlite::memory:'
-                    queue: refund
-
-        pending-db:
-            class: PDO
-            constructor-parameters:
-                - 'sqlite::memory:'
->>>>>>> BRANCH (71a57e Deal with refunds having no txn_type)
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index e6c9f2f..0000000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,129 +0,0 @@
-<<<<<<< HEAD   (077ffc Merge branch 'master' into deployment)
-=======
-<?php
-namespace SmashPig\PaymentProviders\PayPal\Tests;
-
-use SmashPig\Core\Configuration;
-use SmashPig\Core\Context;
-use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
-use SmashPig\PaymentProviders\PayPal\Listener;
-use SmashPig\PaymentProviders\PayPal\Job;
-use SmashPig\PaymentProviders\PayPal\Tests\PayPalTestConfiguration;
-use SmashPig\Tests\BaseSmashPigUnitTestCase;
-use SmashPig\Core\Http\Response;
-use SmashPig\Core\Http\Request;
-use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
-
-/**
- * Test the IPN listener which receives messages, stores and processes them.
- */
-class CaptureIncomingMessageTest extends BaseSmashPigUnitTestCase {
-
-       /**
-        * @var Configuration
-        */
-       public $config;
-
-       static $fail_verification = false;
-
-       static $message_locations = array(
-               'verified' => 'web_accept.json',
-               'recurring' => 'subscr_signup.json',
-               'recurring' => 'subscr_payment.json',
-               'refund' => 'refund.json',
-       );
-
-       static $messages = array();
-
-       public function setUp() {
-               parent::setUp();
-               $this->config = PayPalTestConfiguration::get();
-
-               // php-queue\PDO complains about pop() from non-existent table
-               $this->config->object( 'data-store/jobs-paypal' )
-                       ->createTable( 'jobs-paypal' );
-
-               Context::initWithLogger( $this->config );
-               foreach ( self::$message_locations as $type => $file ) {
-                       self::$messages[$type] = json_decode(
-                               file_get_contents( __DIR__ . '/../Data/' . 
$file ),
-                               true
-                       );
-               }
-       }
-
-       private function capture( $msg ) {
-               $request = new Request( $msg );
-               $response = new Response;
-               $listener = new Listener;
-               $listener->execute( $request, $response );
-       }
-
-       public function testCapture() {
-               foreach ( self::$messages as $type => $msg ) {
-
-                       $this->capture( $msg );
-
-                       $jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
-                       $jobMessage = $jobQueue->pop();
-
-                       $this->assertEquals( $jobMessage['php-message-class'],
-                               'SmashPig\PaymentProviders\PayPal\Job' );
-
-                       $this->assertEquals( $jobMessage['payload'], $msg );
-
-               }
-       }
-
-       public function testBlankMessage() {
-               $this->capture( array() );
-               $jobQueue = $this->config->object( 'data-store/jobs-paypal' );
-               $this->assertNull( $jobQueue->pop() );
-       }
-
-       public function testConsume() {
-               foreach ( self::$messages as $type => $msg ) {
-                       $this->capture( $msg );
-
-                       $jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
-                       $jobMessage = $jobQueue->pop();
-
-                       $job = KeyedOpaqueStorableObject::fromJsonProxy(
-                               $jobMessage['php-message-class'],
-                               json_encode( $jobMessage )
-                       );
-
-                       $job->execute();
-
-                       $queue = $this->config->object( 'data-store/' . $type );
-                       $queue->createTable( $type );
-                       $message = $queue->pop();
-
-                       $this->assertNotEmpty( $message );
-
-               }
-       }
-
-       public function testFailedConsume() {
-               self::$fail_verification = true;
-               $jobMessage = array( 'txn_type' => 'fail' );
-               $jobClass = 'SmashPig\PaymentProviders\PayPal\Job';
-               $job = KeyedOpaqueStorableObject::fromJsonProxy(
-                       $jobClass,
-                       json_encode( $jobMessage )
-               );
-
-               try {
-                       $job->execute();
-               } catch ( \Exception $e ) {
-                       // TODO I think this can throw a special exception to 
move to
-                       // damaged queue or some other stuff
-                       $this->assertEquals(
-                               
\SmashPig\PaymentProviders\PayPal\Job::$verifyFailedMsg,
-                               $e->getMessage()
-                       );
-               }
-
-       }
-}
->>>>>>> BRANCH (71a57e Deal with refunds having no txn_type)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I386a79b6699315c84ff30c4119e0054e074bd93f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to