Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/342781 )
Change subject: Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment ...................................................................... Merge branch 'master' of https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment f6bbf39 Rerun previous blank_address updates with slightly wider catchment. bf70d74 Do not record dummy data 'N0NE PROVIDED' to the database, Change-Id: Ia9457db14826598d314afc081587c6aec602fe4d --- D sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php 1 file changed, 0 insertions(+), 75 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/81/342781/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php deleted file mode 100644 index fc576b6..0000000 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/AddressImportTest.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -/** - * @group Pipeline - * @group WmfCivicrm - */ -class AddressImportTest extends BaseWmfDrupalPhpUnitTestCase { - - /** - * Contact ID - * - * @var int - */ - protected $contactID; - - public function setUp() { - civicrm_initialize(); - $contact = $this->callAPISuccess('Contact', 'create', array( - 'first_name' => 'Minnie', 'last_name' => 'Mouse', 'contact_type' => 'Individual', 'email' => 'min...@mouse.org') - ); - $this->contactID = $contact['id']; - } - - public function tearDown() { - CRM_Core_DAO::executeQuery("DELETE FROM civicrm_contact WHERE last_name = 'Mouse'"); - } - - /** - * Test creating an address with void data does not create an address. - */ - public function testAddressImportVoidData() { - $msg = array( - 'currency' => 'USD', - 'date' => time(), - 'last_name' => 'Mouse', - 'email' => 'nob...@wikimedia.org', - 'gateway' => 'test_gateway', - 'gateway_txn_id' => mt_rand(), - 'gross' => '1.23', - 'payment_method' => 'cc', - 'street_address' => 'N0NE PROVIDED', - 'postal_code' => 0, - ); - - $contribution = wmf_civicrm_contribution_message_import($msg); - $addresses = $this->callAPISuccess('Address', 'get', array('contact_id' => $contribution['contact_id'])); - $this->assertEquals(0, $addresses['count']); - } - - /** - * Test creating an address with void data does not create an address. - * - * In this case the contact already exists. - */ - public function testAddressImportVoidDataContactExists() { - $msg = array( - 'contact_id' => $this->contactID, - 'currency' => 'USD', - 'date' => time(), - 'last_name' => 'Mouse', - 'email' => 'nob...@wikimedia.org', - 'gateway' => 'test_gateway', - 'gateway_txn_id' => mt_rand(), - 'gross' => '1.23', - 'payment_method' => 'cc', - 'street_address' => 'N0NE PROVIDED', - 'postal_code' => 0, - ); - - $contribution = wmf_civicrm_contribution_message_import($msg); - $addresses = $this->callAPISuccess('Address', 'get', array('contact_id' => $contribution['contact_id'])); - $this->assertEquals(0, $addresses['count']); - } - -} -- To view, visit https://gerrit.wikimedia.org/r/342781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9457db14826598d314afc081587c6aec602fe4d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits