X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FImport%2FMultipleRelationshipTest.php;h=f27421e1eb608411fc527febdf3567496d675120;hb=867970063f640edd408f4eb2fb3fcd8db2761f1b;hp=7bfc7eba8a4a70ec2675e2f478e82aa6e9002777;hpb=4de9f9328a1b4a7daf9802bdb6a6d9989b554fe8;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php b/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php index 7bfc7eba8a..f27421e1eb 100644 --- a/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php +++ b/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php @@ -1,28 +1,28 @@ webtestLogin(); @@ -48,12 +48,10 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase $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() { @@ -70,33 +68,33 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase '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( @@ -110,35 +108,35 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase '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), @@ -150,35 +148,35 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase '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 @@ -227,4 +225,5 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase return array($headers, $rows, $fieldMapper); } + }