<?php
/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
- | |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License along with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
- +--------------------------------------------------------------------+
-*/
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.6 |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM. |
+ | |
+ | CiviCRM is free software; you can copy, modify, and distribute it |
+ | under the terms of the GNU Affero General Public License |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | |
+ | CiviCRM is distributed in the hope that it will be useful, but |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+ | See the GNU Affero General Public License for more details. |
+ | |
+ | You should have received a copy of the GNU Affero General Public |
+ | License along with this program; if not, contact CiviCRM LLC |
+ | at info[AT]civicrm[DOT]org. If you have questions about the |
+ | GNU Affero General Public License or the licensing of CiviCRM, |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
+ */
require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
parent::setUp();
}
- /*
- * Test Multiple Relationship import for Individuals.
- */
+ /**
+ * Test Multiple Relationship import for Individuals.
+ */
public function testMultipleRelationshipImport() {
$this->webtestLogin();
$this->importContacts($headers, $rows, 'Individual', 'Skip', $fieldMapper);
}
- /*
- * Helper function to provide data for multiple relationship import
- * for Individuals.
-
- */
/**
+ * Helper function to provide data for multiple relationship import.
+ * for Individuals.
+ *
* @return array
*/
public function _individualRelationshipCSVData() {
'state' => 'State',
'country' => 'Country',
'contact_relationships' =>
- array(
- '4_a_b' => array(
- 'organization_name' => 'Organization Name',
- 'organization_email' => 'Organization Email',
- 'organization_add' => 'Organization Street Address',
- 'organization_city' => 'Organization City',
- 'organization_state' => 'Organization State',
- 'organization_country' => 'Organization Country',
- ),
- '7_a_b' => array(
- 'household_name' => 'Household Name',
- 'household_email' => 'Household Name',
- 'household_add' => 'Household Street Address',
- 'household_city' => 'Household City',
- 'household_state' => 'Household State',
- 'household_country' => 'Household Country',
- ),
- '2_a_b' => array(
- 'spouse_f_name' => 'Spouse First Name',
- 'spouse_l_name' => 'Spouse Last Name',
- 'spouse_email' => 'Spouse Email',
- 'spouse_add' => 'Spouse Street Address',
- 'spouse_city' => 'Spouse City',
- 'spouse_state' => 'Spouse State',
- 'spouse_country' => 'Spouse Country',
- ),
+ array(
+ '4_a_b' => array(
+ 'organization_name' => 'Organization Name',
+ 'organization_email' => 'Organization Email',
+ 'organization_add' => 'Organization Street Address',
+ 'organization_city' => 'Organization City',
+ 'organization_state' => 'Organization State',
+ 'organization_country' => 'Organization Country',
+ ),
+ '7_a_b' => array(
+ 'household_name' => 'Household Name',
+ 'household_email' => 'Household Name',
+ 'household_add' => 'Household Street Address',
+ 'household_city' => 'Household City',
+ 'household_state' => 'Household State',
+ 'household_country' => 'Household Country',
),
+ '2_a_b' => array(
+ 'spouse_f_name' => 'Spouse First Name',
+ 'spouse_l_name' => 'Spouse Last Name',
+ 'spouse_email' => 'Spouse Email',
+ 'spouse_add' => 'Spouse Street Address',
+ 'spouse_city' => 'Spouse City',
+ 'spouse_state' => 'Spouse State',
+ 'spouse_country' => 'Spouse Country',
+ ),
+ ),
);
$rows = array(
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'contact_relationships' =>
- array(
- '4_a_b' => array(
- 'organization_name' => 'Org ' . substr(sha1(rand()), 0, 7),
- 'organization_email' => substr(sha1(rand()), 0, 7) . 'org@example.org',
- 'organization_add' => 'Org Street Address',
- 'organization_city' => 'Org City',
- 'organization_state' => 'NY',
- 'organization_country' => 'United States',
- ),
- '7_a_b' => array(
- 'household_name' => 'House ' . substr(sha1(rand()), 0, 7),
- 'household_email' => substr(sha1(rand()), 0, 7) . 'house@example.org',
- 'household_add' => 'House Street Address',
- 'household_city' => 'House City',
- 'household_state' => 'NY',
- 'household_country' => 'United States',
- ),
- '2_a_b' => array(
- 'spouse_f_name' => substr(sha1(rand()), 0, 7),
- 'spouse_l_name' => substr(sha1(rand()), 0, 7),
- 'spouse_email' => substr(sha1(rand()), 0, 7) . 'spouse@example.org',
- 'spouse_add' => 'Spouse Street Address',
- 'spouse_city' => 'Spouse City',
- 'spouse_state' => 'NY',
- 'spouse_country' => 'United States',
- ),
+ array(
+ '4_a_b' => array(
+ 'organization_name' => 'Org ' . substr(sha1(rand()), 0, 7),
+ 'organization_email' => substr(sha1(rand()), 0, 7) . 'org@example.org',
+ 'organization_add' => 'Org Street Address',
+ 'organization_city' => 'Org City',
+ 'organization_state' => 'NY',
+ 'organization_country' => 'UNITED STATES',
+ ),
+ '7_a_b' => array(
+ 'household_name' => 'House ' . substr(sha1(rand()), 0, 7),
+ 'household_email' => substr(sha1(rand()), 0, 7) . 'house@example.org',
+ 'household_add' => 'House Street Address',
+ 'household_city' => 'House City',
+ 'household_state' => 'NY',
+ 'household_country' => 'UNITED STATES',
+ ),
+ '2_a_b' => array(
+ 'spouse_f_name' => substr(sha1(rand()), 0, 7),
+ 'spouse_l_name' => substr(sha1(rand()), 0, 7),
+ 'spouse_email' => substr(sha1(rand()), 0, 7) . 'spouse@example.org',
+ 'spouse_add' => 'Spouse Street Address',
+ 'spouse_city' => 'Spouse City',
+ 'spouse_state' => 'NY',
+ 'spouse_country' => 'UNITED STATES',
),
+ ),
),
array(
'first_name' => substr(sha1(rand()), 0, 7),
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'contact_relationships' =>
- array(
- '4_a_b' => array(
- 'organization_name' => 'Org ' . substr(sha1(rand()), 0, 7),
- 'organization_email' => substr(sha1(rand()), 0, 7) . 'org@example.org',
- 'organization_add' => 'Org Street Address',
- 'organization_city' => 'Org City',
- 'organization_state' => 'NY',
- 'organization_country' => 'United States',
- ),
- '7_a_b' => array(
- 'household_name' => 'House ' . substr(sha1(rand()), 0, 7),
- 'household_email' => substr(sha1(rand()), 0, 7) . 'house@example.org',
- 'household_add' => 'House Street Address',
- 'household_city' => 'House City',
- 'household_state' => 'NY',
- 'household_country' => 'United States',
- ),
- '2_a_b' => array(
- 'spouse_f_name' => substr(sha1(rand()), 0, 7),
- 'spouse_l_name' => substr(sha1(rand()), 0, 7),
- 'spouse_email' => substr(sha1(rand()), 0, 7) . 'spouse@example.org',
- 'spouse_add' => 'Spouse Street Address',
- 'spouse_city' => 'Spouse City',
- 'spouse_state' => 'NY',
- 'spouse_country' => 'United States',
- ),
+ array(
+ '4_a_b' => array(
+ 'organization_name' => 'Org ' . substr(sha1(rand()), 0, 7),
+ 'organization_email' => substr(sha1(rand()), 0, 7) . 'org@example.org',
+ 'organization_add' => 'Org Street Address',
+ 'organization_city' => 'Org City',
+ 'organization_state' => 'NY',
+ 'organization_country' => 'UNITED STATES',
+ ),
+ '7_a_b' => array(
+ 'household_name' => 'House ' . substr(sha1(rand()), 0, 7),
+ 'household_email' => substr(sha1(rand()), 0, 7) . 'house@example.org',
+ 'household_add' => 'House Street Address',
+ 'household_city' => 'House City',
+ 'household_state' => 'NY',
+ 'household_country' => 'UNITED STATES',
),
+ '2_a_b' => array(
+ 'spouse_f_name' => substr(sha1(rand()), 0, 7),
+ 'spouse_l_name' => substr(sha1(rand()), 0, 7),
+ 'spouse_email' => substr(sha1(rand()), 0, 7) . 'spouse@example.org',
+ 'spouse_add' => 'Spouse Street Address',
+ 'spouse_city' => 'Spouse City',
+ 'spouse_state' => 'NY',
+ 'spouse_country' => 'UNITED STATES',
+ ),
+ ),
),
);
// for Employee of relationship
return array($headers, $rows, $fieldMapper);
}
+
}