Awight has submitted this change and it was merged.
Change subject: Merge remote-tracking branch 'origin/master' into HEAD
......................................................................
Merge remote-tracking branch 'origin/master' into HEAD
Change-Id: I6400484a1ecf9d407fa184238601760c9956417b
---
D sites/all/modules/large_donation/tests/LargeDonationTest.php
D sites/all/modules/wmf_campaigns/tests/WmfCampaignTest.php
D sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
D sites/all/modules/wmf_communication/tests/TestMailer.php
D sites/all/modules/wmf_communication/tests/phpunit/CiviMailBulkTest.php
D sites/all/modules/wmf_communication/tests/phpunit/CiviMailTest.php
D sites/all/modules/wmf_communication/tests/phpunit/CiviMailTestBase.php
D sites/all/modules/wmf_communication/tests/phpunit/SilverpopImporterTest.php
8 files changed, 0 insertions(+), 635 deletions(-)
Approvals:
Awight: Looks good to me, approved
diff --git a/sites/all/modules/large_donation/tests/LargeDonationTest.php
b/sites/all/modules/large_donation/tests/LargeDonationTest.php
deleted file mode 100644
index 8596678..0000000
--- a/sites/all/modules/large_donation/tests/LargeDonationTest.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-
-use wmf_communication\TestMailer;
-
-class LargeDonationTest extends BaseWmfDrupalPhpUnitTestCase {
- function setUp() {
- parent::setUp();
- civicrm_initialize();
-
- TestMailer::setup();
-
- $this->original_large_donation_amount = variable_get(
'large_donation_amount', null );
- $this->original_large_donation_notifymail = variable_get(
'large_donation_notifymail', null );
- $this->threshold = 100;
- variable_set( 'large_donation_amount', $this->threshold );
- variable_set( 'large_donation_notifymail', '[email protected]' );
-
- $result = civicrm_api3( 'Contact', 'create', array(
- 'contact_type' => 'Individual',
- 'first_name' => 'Testes',
- ) );
- $this->contact_id = $result['id'];
- }
-
- function tearDown() {
- variable_set( 'large_donation_amount',
$this->original_large_donation_amount );
- variable_set( 'large_donation_notifymail',
$this->original_large_donation_notifymail );
- parent::tearDown();
- }
-
- function testUnderThreshold() {
- $result = civicrm_api3( 'Contribution', 'create', array(
- 'contact_id' => $this->contact_id,
- 'contribution_type' => 'Cash',
- 'currency' => 'USD',
- 'payment_instrument' => 'Credit Card',
- 'total_amount' => $this->threshold - 0.01,
- 'trxn_id' => 'TEST_GATEWAY ' . mt_rand(),
- ) );
-
- $this->assertEquals( 0, TestMailer::countMailings() );
- }
-
- function testAboveThreshold() {
- $amount = $this->threshold + 0.01;
- $result = civicrm_api3( 'Contribution', 'create', array(
- 'contact_id' => $this->contact_id,
- 'contribution_type' => 'Cash',
- 'currency' => 'USD',
- 'payment_instrument' => 'Credit Card',
- 'total_amount' => $amount,
- 'trxn_id' => 'TEST_GATEWAY ' . mt_rand(),
- 'source' => 'EUR 2020',
- ) );
-
- $this->assertEquals( 1, TestMailer::countMailings() );
-
- $mailing = TestMailer::getMailing( 0 );
- $this->assertEquals( 1, preg_match( "/{$amount}/", $mailing['html'] ),
- 'Found amount in the notification email body.' );
- }
-}
diff --git a/sites/all/modules/wmf_campaigns/tests/WmfCampaignTest.php
b/sites/all/modules/wmf_campaigns/tests/WmfCampaignTest.php
deleted file mode 100644
index 3a9a5ba..0000000
--- a/sites/all/modules/wmf_campaigns/tests/WmfCampaignTest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
-use wmf_communication\TestMailer;
-
-class WmfCampaignTest extends BaseWmfDrupalPhpUnitTestCase {
- function setUp() {
- parent::setUp();
- civicrm_initialize();
-
- TestMailer::setup();
-
- $this->campaign_custom_field_name = wmf_civicrm_get_custom_field_name(
'Appeal' );
-
- $this->campaign_key = 'fooCamp' . mt_rand();
- $this->notification_email = '[email protected]';
-
- $result = civicrm_api3( 'Contact', 'create', array(
- 'contact_type' => 'Individual',
- 'first_name' => 'Testes',
- ) );
- $this->contact_id = $result['id'];
-
- db_merge( 'wmf_campaigns_campaign' )
- ->key( array( 'campaign_key' => $this->campaign_key ) )
- ->fields( array(
- 'campaign_key' => $this->campaign_key,
- 'notification_email' => $this->notification_email,
- ) )
- ->execute();
- }
-
- function testMatchingDonation() {
- $result = civicrm_api3( 'Contribution', 'create', array(
- 'contact_id' => $this->contact_id,
- 'contribution_type' => 'Cash',
- 'currency' => 'USD',
- 'payment_instrument' => 'Credit Card',
- 'total_amount' => '1.23',
- 'trxn_id' => 'TEST_GATEWAY ' . mt_rand(),
- $this->campaign_custom_field_name => $this->campaign_key,
- ) );
-
- $this->assertEquals( 1, TestMailer::countMailings() );
-
- $mailing = TestMailer::getMailing( 0 );
- $this->assertNotEquals( false, strpos( $mailing['html'],
$this->campaign_key ),
- 'Campaign name found in notification email.' );
- }
-
- function testNonMatchingDonation() {
- $result = civicrm_api3( 'Contribution', 'create', array(
- 'contact_id' => $this->contact_id,
- 'contribution_type' => 'Cash',
- 'currency' => 'USD',
- 'payment_instrument' => 'Credit Card',
- 'total_amount' => '1.23',
- 'trxn_id' => 'TEST_GATEWAY ' . mt_rand(),
- $this->campaign_custom_field_name => $this->campaign_key . "NOT",
- ) );
-
- $this->assertEquals( 0, TestMailer::countMailings() );
- }
-
- function testNoCampaignDonation() {
- $result = civicrm_api3( 'Contribution', 'create', array(
- 'contact_id' => $this->contact_id,
- 'contribution_type' => 'Cash',
- 'currency' => 'USD',
- 'payment_instrument' => 'Credit Card',
- 'total_amount' => '1.23',
- 'trxn_id' => 'TEST_GATEWAY ' . mt_rand(),
- ) );
-
- $this->assertEquals( 0, TestMailer::countMailings() );
- }
-}
diff --git
a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
b/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
deleted file mode 100644
index 23e91bb..0000000
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/NormalizeMessageTest.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<<<<<<< HEAD (298443 unrollback drupal submodule)
-=======
-<?php
-
-class NormalizeMessageTest extends BaseWmfDrupalPhpUnitTestCase {
- public static function getInfo() {
- return array(
- 'name' => 'WmfCivicrm message normalization',
- 'group' => 'Pipeline',
- 'description' => 'Checks for queue message normalization behavior',
- );
- }
-
- public function testDoubleNormalization() {
- // Start with a message already in normal form, to make comparison easy
- $original_msg = array(
- 'anonymous' => 0,
- 'check_number' => '',
- 'city' => '',
- 'comment' => '',
- 'contact_id' => mt_rand(),
- 'contact_tags' => array(),
- 'contribution_recur_id' => mt_rand(),
- 'contribution_tags' => array(),
- 'contribution_tracking_id' => mt_rand(),
- 'contribution_tracking_update' => '1',
- 'contribution_type' => 'cash',
- 'contribution_type_id' => '9',
- 'country' => 'IL',
- 'create_date' => time() + 11,
- 'currency' => 'USD',
- 'date' => time() + 1,
- 'effort_id' => '2',
- 'email' => '[email protected]',
- 'fee' => 0.5,
- 'first_name' => 'test',
- 'gateway' => 'paypal',
- 'gateway_txn_id' => '1234AB1234-2',
- 'gross' => 5.8,
- 'last_name' => 'es',
- 'letter_code' => '',
- 'middle_name' => '',
- 'net' => 5.29,
- 'optout' => 0,
- 'organization_name' => '',
- 'original_currency' => 'ILS',
- 'original_gross' => '20.00',
- 'payment_date' => time(),
- 'payment_instrument_id' => '25',
- 'payment_instrument' => 'Paypal',
- 'postal_code' => '',
- 'postmark_date' => null,
- 'recurring' => '1',
- 'source_enqueued_time' => time() + 2,
- 'source_host' => 'thulium',
- 'source_name' => 'PayPal IPN (legacy)',
- 'source_run_id' => mt_rand(),
- 'source_type' => 'listener',
- 'source_version' => 'legacy',
- 'start_date' => time() + 10,
- 'state_province' => '',
- 'street_address' => '',
- 'subscr_id' => 'TEST-S-1234567' . mt_rand(),
- 'supplemental_address_1' => '',
- 'supplemental_address_2' => '',
- 'thankyou_date' => '',
- 'txn_type' => 'subscr_payment',
- 'utm_campaign' => '',
- );
-
- $msg = $original_msg;
- $normal_msg_1 = wmf_civicrm_normalize_msg( $msg );
- $this->assertEquals( $original_msg, $normal_msg_1 );
- $normal_msg_2 = wmf_civicrm_normalize_msg( $normal_msg_1 );
- $this->assertEquals( $original_msg, $normal_msg_2 );
- }
-}
->>>>>>> BRANCH (87499b Add OANDA API Key config, placeholder for remaining
queries)
diff --git a/sites/all/modules/wmf_communication/tests/TestMailer.php
b/sites/all/modules/wmf_communication/tests/TestMailer.php
deleted file mode 100644
index 88ee76d..0000000
--- a/sites/all/modules/wmf_communication/tests/TestMailer.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-namespace wmf_communication;
-
-class TestMailer implements IMailer {
- static protected $mailings;
-
- public function setup() {
- Mailer::$defaultSystem = 'test';
-
- self::$mailings = array();
- }
-
- public function send( $email ) {
- self::$mailings[] = $email;
- }
-
- public function countMailings() {
- return count( self::$mailings );
- }
-
- public function getMailing( $index ) {
- return self::$mailings[$index];
- }
-}
diff --git
a/sites/all/modules/wmf_communication/tests/phpunit/CiviMailBulkTest.php
b/sites/all/modules/wmf_communication/tests/phpunit/CiviMailBulkTest.php
deleted file mode 100644
index 724e779..0000000
--- a/sites/all/modules/wmf_communication/tests/phpunit/CiviMailBulkTest.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-namespace wmf_communication;
-
-use \CRM_Activity_BAO_Activity;
-use \CRM_Activity_BAO_ActivityTarget;
-use \CRM_Core_OptionGroup;
-use \CRM_Mailing_BAO_Recipients;
-use \CRM_Mailing_Event_BAO_Queue;
-use \CRM_Mailing_Event_BAO_Delivered;
-/**
- * Tests for CiviMail helper classes
- */
-class CiviMailBulkTest extends CiviMailTestBase {
-
- protected $contacts = array();
- protected $emails = array();
- /**
- * @var ICiviMailBulkStore
- */
- protected $bulkMailStore;
-
- public function setUp() {
- parent::setUp();
-
- $this->bulkMailStore = new CiviMailBulkStore();
-
- for ( $i = 1; $i <= 10; $i++ ) {
- $emailAddress = "[email protected]";
- $firstName = "Kevin$i";
- $lastName = 'Hondo';
-
- $contact = $this->getContact( $emailAddress,
$firstName, $lastName );
-
- $this->contacts[] = $contact + array( 'emailAddress' =>
$emailAddress );
- $this->emails[] = $emailAddress;
- }
- }
-
- public function tearDown() {
- parent::tearDown();
- foreach ( $this->contacts as $contact ) {
- civicrm_api3( 'Email', 'delete', array( 'id' =>
$contact['emailID'] ) );
- civicrm_api3( 'Contact', 'delete', array( 'id' =>
$contact['contactID'] ) );
- }
- }
-
- public function testAddSentBulk() {
- $name = 'test_mailing';
- $revision = mt_rand();
- $storedMailing = $this->mailStore->addMailing(
- $this->source,
- $name,
- $this->body,
- $this->subject,
- $revision
- );
-
- $this->bulkMailStore->addSentBulk( $storedMailing,
$this->emails );
-
- $mailingID = $storedMailing->getMailingID();
- // Should have a single bulk mailing activity created
- $activity = new CRM_Activity_BAO_Activity();
- $bulkMail = CRM_Core_OptionGroup::getValue('activity_type',
- 'Bulk Email',
- 'name'
- );
- $activity->activity_type_id = $bulkMail;
- $activity->source_record_id = $mailingID;
- $this->assertTrue( $activity->find() && $activity->fetch() );
-
- foreach ( $this->contacts as $contact ) {
- //recipients table
- $recipients = new CRM_Mailing_BAO_Recipients();
- $recipients->mailing_id = $mailingID;
- $recipients->contact_id = $contact['contactID'];
- $recipients->email_id = $contact['emailID'];
- $this->assertTrue( $recipients->find() &&
$recipients->fetch() );
-
- //queue entry
- $queueQuery = "SELECT q.id, q.contact_id
-FROM civicrm_mailing_event_queue q
-INNER JOIN civicrm_mailing_job j ON q.job_id = j.id
-WHERE j.mailing_id = $mailingID";
-
- $queue = new CRM_Mailing_Event_BAO_Queue();
- $queue->query( $queueQuery );
- $this->assertTrue( $queue->fetch() );
-
- //delivery event
- $delivered = new CRM_Mailing_Event_BAO_Delivered();
- $delivered->event_queue_id = $queue->id;
- $this->assertTrue( $delivered->find() &&
$delivered->fetch() );
-
- //activity target
- $activityTarget = new CRM_Activity_BAO_ActivityTarget();
- $activityTarget->activity_id = $activity->id;
- $activityTarget->target_contact_id =
$contact['contactID'];
- $this->assertTrue( $activityTarget->find() &&
$activityTarget->fetch() );
- }
- }
-}
\ No newline at end of file
diff --git a/sites/all/modules/wmf_communication/tests/phpunit/CiviMailTest.php
b/sites/all/modules/wmf_communication/tests/phpunit/CiviMailTest.php
deleted file mode 100644
index 20c3a37..0000000
--- a/sites/all/modules/wmf_communication/tests/phpunit/CiviMailTest.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<<<<<<< HEAD (298443 unrollback drupal submodule)
-=======
-<?php
-namespace wmf_communication;
-
-/**
- * Tests for CiviMail helper classes
- */
-class CiviMailTest extends CiviMailTestBase {
-
- public function testAddMailing() {
- $name = 'test_mailing';
- $revision = mt_rand();
- $storedMailing = $this->mailStore->addMailing(
- $this->source,
- $name,
- $this->body,
- $this->subject,
- $revision
- );
- $this->assertInstanceOf(
- 'wmf_communication\ICiviMailingRecord',
- $storedMailing,
- 'addMailing should return an ICiviMailingRecord'
- );
- $this->assertTrue(
- is_numeric( $storedMailing->getMailingID() ),
- 'CiviMailingRecord should have a numeric mailing ID'
- );
- }
-
- public function testGetMailing() {
- $name = 'test_mailing';
- $revision = mt_rand();
- $storedMailing = $this->mailStore->addMailing(
- $this->source,
- $name,
- $this->body,
- $this->subject,
- $revision
- );
- $retrievedMailing = $this->mailStore->getMailing(
- $this->source,
- $name,
- $revision
- );
- $this->assertEquals(
- $storedMailing->getMailingID(),
- $retrievedMailing->getMailingID(),
- 'Retrieved mailing has wrong MailingID'
- );
- $this->assertEquals(
- $storedMailing->getJobID(),
- $retrievedMailing->getJobID(),
- 'Retrieved mailing has wrong JobID'
- );
- }
-
- /**
- * @expectedException wmf_communication\CiviMailingMissingException
- */
- public function testMissingMailing() {
- $this->mailStore->getMailing( 'fakeSource', 'fakeName',
mt_rand() );
- }
-
- public function testAddQueueRecord() {
- $name = 'test_mailing';
- $revision = mt_rand();
- $storedMailing = $this->mailStore->addMailing(
- $this->source,
- $name,
- $this->body,
- $this->subject,
- $revision
- );
- $queueRecord = $this->mailStore->addQueueRecord(
- $storedMailing,
- '[email protected]',
- '20140205104611'
- );
- $this->assertInstanceOf(
- 'wmf_communication\ICiviMailQueueRecord',
- $queueRecord,
- 'addQueueRecord should return an ICiviMailQueueRecord'
- );
- $this->assertTrue(
- is_numeric( $queueRecord->getQueueID() ),
- 'CiviMailQueueRecord should have a numeric ID'
- );
- $this->assertEquals(
- $this->contactID,
- $queueRecord->getContactID(),
- 'CiviMailQueueRecord has wrong contact ID'
- );
- $this->assertEquals(
- $this->emailID,
- $queueRecord->getEmailID(),
- 'CiviMailQueueRecord has wrong email ID'
- );
- }
-}
->>>>>>> BRANCH (87499b Add OANDA API Key config, placeholder for remaining
queries)
diff --git
a/sites/all/modules/wmf_communication/tests/phpunit/CiviMailTestBase.php
b/sites/all/modules/wmf_communication/tests/phpunit/CiviMailTestBase.php
deleted file mode 100644
index 51875ca..0000000
--- a/sites/all/modules/wmf_communication/tests/phpunit/CiviMailTestBase.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace wmf_communication;
-
-use \BaseWmfDrupalPhpUnitTestCase;
-
-/**
- * Base class for tests of CiviMail helper classes
- */
-class CiviMailTestBase extends BaseWmfDrupalPhpUnitTestCase {
-
- protected $source = 'wmf_communication_test';
- protected $body = '<p>Dear Wikipedia supporter,</p><p>You are
beautiful.</p>';
- protected $subject = 'Thank you';
- /**
- * @var ICiviMailStore
- */
- protected $mailStore;
- protected $contactID;
- protected $emailID;
-
- public function setUp() {
- parent::setUp();
- civicrm_initialize();
- $this->mailStore = new CiviMailStore();
- $contact = $this->getContact( '[email protected]',
'Trius', 'Hondo' );
- $this->emailID = $contact[ 'emailID' ];
- $this->contactID = $contact[ 'contactID' ];
- }
-
- protected function getContact( $email, $firstName, $lastName ) {
- $emailResult = civicrm_api3( 'Email', 'get', array(
- 'email' => $email,
- ) );
- $firstResult = reset( $emailResult['values'] );
- if ( $firstResult ) {
- return array(
- 'emailID' => $firstResult['id'],
- 'contactID' => $firstResult['contact_id'],
- );
- } else {
- $contactResult = civicrm_api3( 'Contact', 'create',
array(
- 'first_name' => $firstName,
- 'last_name' => $lastName,
- 'contact_type' => 'Individual',
- ) );
- $emailResult = civicrm_api3( 'Email', 'create', array(
- 'email' => $email,
- 'contact_id' => $contactResult['id'],
- ) );
- return array(
- 'emailID' => $emailResult['id'],
- 'contactID' => $contactResult['id'],
- );
- }
- }
-
- public function tearDown() {
- civicrm_api3( 'Email', 'delete', array( 'id' => $this->emailID
) );
- civicrm_api3( 'Contact', 'delete', array( 'id' =>
$this->contactID ) );
- }
-}
\ No newline at end of file
diff --git
a/sites/all/modules/wmf_communication/tests/phpunit/SilverpopImporterTest.php
b/sites/all/modules/wmf_communication/tests/phpunit/SilverpopImporterTest.php
deleted file mode 100644
index 183ae99..0000000
---
a/sites/all/modules/wmf_communication/tests/phpunit/SilverpopImporterTest.php
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-namespace wmf_communication;
-use \BaseWmfDrupalPhpUnitTestCase;
-
-class SilverpopImporterTest extends BaseWmfDrupalPhpUnitTestCase {
- function testImport() {
- $sftp = $this->getMockBuilder( 'Net_SFTP' )
- ->disableOriginalConstructor()
- ->setMethods( array( 'login', 'get' ) )
- ->getMock();
- $mailStore = $this->getMock( 'CiviMailBulkStore', array(
'getMailing', 'addMailing', 'addSentBulk' ) );
- $zipper = $this->getMock( 'ZipArchive', array( 'open',
'extractTo' ) );
- $mailing = $this->getMock( 'ICiviMailingRecord', array(
'getMailingName' ) );
-
- $tempDir = file_directory_temp();
-
- $sftp->expects( $this->atLeastOnce() )
- ->method( 'login' )
- ->with( 'TestUser', 'TestPass' )
- ->will( $this->returnValue( true ) );
-
- $sftp->expects( $this->once() )
- ->method( 'get' )
- ->with( 'download/Raw Recipient Data Export Sep 02 2014
18-45-05 PM 1200.zip',
- "$tempDir/Raw Recipient Data Export Sep
02 2014 18-45-05 PM 1200.zip" )
- ->will( $this->returnValue( true ) );
-
- $zipper->expects( $this->once() )
- ->method( 'open' )
- ->with( "$tempDir/Raw Recipient Data Export Sep 02 2014
18-45-05 PM 1200.zip" )
- ->will( $this->returnValue( true ) );
-
- $zipper->expects( $this->once() )
- ->method( 'extractTo' )
- ->with( $tempDir )
- ->will( $this->returnValue( true ) );
-
- $mailStore->expects( $this->once() )
- ->method( 'getMailing' )
- ->with( 'Silverpop', '9876543' )
- ->will( $this->ThrowException( new
CiviMailingMissingException() ) );
-
- $mailStore->expects( $this->once() )
- ->method( 'addMailing' )
- ->with( 'Silverpop', '9876543', $this->anything(),
'Test Subject', 0, 'RUNNING' )
- ->will( $this->returnValue( $mailing ) );
-
- $emails = array();
- $fileContents = "Recipient Id,Recipient Type,Mailing Id,Report
Id,Campaign Id,Email,Event Type,Event Timestamp,Body Type,Content Id,Click
Name,URL,Conversion Action,Conversion Detail,Conversion Amount,Suppression
Reason,,\n";
- for( $i = 0; $i < 10; $i++ ) {
- $email = "[email protected]";
- $emails[] = $email;
- $fileContents .= mt_rand();
- $fileContents .= ',Normal,9876543,503612902,"",';
- $fileContents .= $email;
- $fileContents .= ',Sent,08/29/2014
12:00:08,"","","","","","","","","",""';
- $fileContents .= "\n";
- }
- //add a suppressed record to the end to see that we don't
insert it along with the sent
- $fileContents .=
'105817151078,Normal,9876543,503612902,"",[email protected],Suppressed,08/29/2014
12:00:08,"","","","","","","",Organization Suppression List,"",""' . "\n";
- // Writing a real file since we're not mocking CsvBatchFile
- file_put_contents( "$tempDir/Raw Recipient Data Export Sep 02
2014 18-45-05 PM 1200.csv", $fileContents );
-
- $mailStore->expects( $this->once() )
- ->method( 'addSentBulk' )
- ->with( $mailing, $emails );
-
- $options = array(
- 'engage' => new FakeEngage(),
- 'username' => 'TestUser',
- 'password' => 'TestPass',
- 'sftp' => $sftp,
- 'civimailstore' => $mailStore,
- 'zipper' => $zipper,
- );
-
- $silverpopImporter = new SilverpopImporter( $options );
-
- $silverpopImporter->import( 1 );
-
- //TODO: assert some things about $engage->executeArgs;
- }
-}
-
-class FakeEngage {
- public $executeResponses = array(
- 'GetSentMailingsForOrg' => '<Mailing>
-<MailingId>9876543</MailingId>
-<ReportId>135791113</ReportId>
-<ScheduledTS>2014-09-02 13:24:23.0</ScheduledTS>
-<MailingName><![CDATA[Test Mailing]]></MailingName>
-<ListName><![CDATA[Test List]]></ListName>
-<ListId>1234567</ListId>
-<UserName>Mailing Sender</UserName>
-<SentTS>2014-09-02 13:25:12.0</SentTS>
-<NumSent>3</NumSent>
-<Subject><![CDATA[Test Subject]]></Subject>
-<Visibility>Shared</Visibility>
-</Mailing>',
- 'RawRecipientDataExport' => '<MAILING>
-<JOB_ID>77665544</JOB_ID>
-<FILE_PATH>Raw Recipient Data Export Sep 02 2014 18-45-05 PM
1200.zip</FILE_PATH>
-</MAILING>',
- 'GetJobStatus' => '<JOB_ID>77665544</JOB_ID>
-<JOB_STATUS>COMPLETE</JOB_STATUS>
-<JOB_DESCRIPTION>Export raw recipient data.</JOB_DESCRIPTION>
-<PARAMETERS>
-</PARAMETERS>'
- );
-
- public function login() {
- return true;
- }
-
- public $executeArgs = array();
- /**
- * @param SimpleXMLElement $simplexml
- */
- public function execute( $simplexml ) {
- $kids = $simplexml->Body->children();
- $nodeName = $kids[0]->getName();
- $this->executeArgs[$nodeName] = $simplexml;
- return simplexml_load_string("<Body>
-<RESULT>
-<SUCCESS>TRUE</SUCCESS>
-" . $this->executeResponses[$nodeName] . "
-</RESULT>
-</Body>
-");
- }
-}
--
To view, visit https://gerrit.wikimedia.org/r/160999
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6400484a1ecf9d407fa184238601760c9956417b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits