X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FImport%2FMultipleRelationshipTest.php;h=f27421e1eb608411fc527febdf3567496d675120;hb=867970063f640edd408f4eb2fb3fcd8db2761f1b;hp=c83816257d8987c352d0dbd634e6899e151a6fe1;hpb=1761553f7e28866ef0c0a9f54abbb222487cea5c;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php b/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php index c83816257d..f27421e1eb 100644 --- a/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php +++ b/tests/phpunit/WebTest/Import/MultipleRelationshipTest.php @@ -1,28 +1,28 @@ webtestLogin(); // Get sample import data. @@ -48,15 +48,13 @@ 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 */ - function _individualRelationshipCSVData() { + public function _individualRelationshipCSVData() { $headers = array( 'first_name' => 'First Name', @@ -71,7 +69,8 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase 'country' => 'Country', 'contact_relationships' => array( - '4_a_b' => array('organization_name' => 'Organization Name', + '4_a_b' => array( + 'organization_name' => 'Organization Name', 'organization_email' => 'Organization Email', 'organization_add' => 'Organization Street Address', 'organization_city' => 'Organization City', @@ -99,7 +98,8 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase ); $rows = array( - array('first_name' => substr(sha1(rand()), 0, 7), + array( + 'first_name' => substr(sha1(rand()), 0, 7), 'middle_name' => substr(sha1(rand()), 0, 7), 'last_name' => 'Anderson', 'email' => substr(sha1(rand()), 0, 7) . '@example.com', @@ -108,33 +108,38 @@ 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), + 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', + 'organization_country' => 'UNITED STATES', ), - '7_a_b' => array('household_name' => 'House ' . substr(sha1(rand()), 0, 7), + '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', + 'household_country' => 'UNITED STATES', ), - '2_a_b' => array('spouse_f_name' => substr(sha1(rand()), 0, 7), + '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', + 'spouse_country' => 'UNITED STATES', ), ), ), - array('first_name' => substr(sha1(rand()), 0, 7), + array( + 'first_name' => substr(sha1(rand()), 0, 7), 'middle_name' => substr(sha1(rand()), 0, 7), 'last_name' => 'Summerson', 'email' => substr(sha1(rand()), 0, 7) . '@example.com', @@ -143,34 +148,38 @@ 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), + 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', + 'organization_country' => 'UNITED STATES', ), - '7_a_b' => array('household_name' => 'House ' . substr(sha1(rand()), 0, 7), + '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', + 'household_country' => 'UNITED STATES', ), - '2_a_b' => array('spouse_f_name' => substr(sha1(rand()), 0, 7), + '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', + 'spouse_country' => 'UNITED STATES', ), ), ), ); - // for Employee of relationship + // for Employee of relationship $fieldMapper = array( 'mapper[10][0]' => '5_a_b', 'mapper[10][1]' => 'organization_name', @@ -216,5 +225,5 @@ class WebTest_Import_MultipleRelationshipTest extends ImportCiviSeleniumTestCase return array($headers, $rows, $fieldMapper); } -} +}