X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FImport%2FContactTest.php;h=e012887a55b6f666c418509e56a42af2b4168ce5;hb=1b9976cbf762dbf6513df8a4141626d2e5584171;hp=9db6dcf3f6c93edbf5c5b214a99b4af074d53c14;hpb=e100ac07be991fa09fc460871e4bd39ee45355f0;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Import/ContactTest.php b/tests/phpunit/WebTest/Import/ContactTest.php index 9db6dcf3f6..e012887a55 100644 --- a/tests/phpunit/WebTest/Import/ContactTest.php +++ b/tests/phpunit/WebTest/Import/ContactTest.php @@ -1,7 +1,7 @@ webtestLogin(); // Get sample import data. @@ -118,10 +122,10 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'No Duplicate Checking'); } - /* + /** * Test contact import for Organization. */ - function testOrganizationImport() { + public function testOrganizationImport() { $this->webtestLogin(); @@ -199,10 +203,10 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Organization', 'No Duplicate Checking'); } - /* + /** * Test contact import for Household. */ - function testHouseholdImport() { + public function testHouseholdImport() { $this->webtestLogin(); @@ -283,7 +287,10 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { /* * Helper function to provide data for contact import for Individuals. */ - function _individualCSVData() { + /** + * @return array + */ + public function _individualCSVData() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -298,7 +305,8 @@ class WebTest_Import_ContactTest 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', @@ -309,7 +317,8 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { 'state' => 'NY', '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', @@ -328,7 +337,10 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { /* * Helper function to provide data for contact import for Organizations. */ - function _organizationCSVData() { + /** + * @return array + */ + public function _organizationCSVData() { $headers = array( 'organization_name' => 'Organization Name', 'email' => 'Email', @@ -341,7 +353,8 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { ); $rows = array( - array('organization_name' => 'org_' . substr(sha1(rand()), 0, 7), + array( + 'organization_name' => 'org_' . substr(sha1(rand()), 0, 7), 'email' => substr(sha1(rand()), 0, 7) . '@example.org', 'phone' => '9949912154', 'address_1' => 'Add 1', @@ -350,7 +363,8 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { 'state' => 'NY', 'country' => 'United States', ), - array('organization_name' => 'org_' . substr(sha1(rand()), 0, 7), + array( + 'organization_name' => 'org_' . substr(sha1(rand()), 0, 7), 'email' => substr(sha1(rand()), 0, 7) . '@example.org', 'phone' => '6949412154', 'address_1' => 'Add 1', @@ -367,7 +381,10 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { /* * Helper function to provide data for contact import for Household. */ - function _householdCSVData() { + /** + * @return array + */ + public function _householdCSVData() { $headers = array( 'household_name' => 'Household Name', 'email' => 'Email', @@ -380,7 +397,8 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { ); $rows = array( - array('household_name' => 'household_' . substr(sha1(rand()), 0, 7), + array( + 'household_name' => 'household_' . substr(sha1(rand()), 0, 7), 'email' => substr(sha1(rand()), 0, 7) . '@example.org', 'phone' => '3949912154', 'address_1' => 'Add 1', @@ -389,7 +407,8 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { 'state' => 'NY', 'country' => 'United States', ), - array('household_name' => 'household_' . substr(sha1(rand()), 0, 7), + array( + 'household_name' => 'household_' . substr(sha1(rand()), 0, 7), 'email' => substr(sha1(rand()), 0, 7) . '@example.org', 'phone' => '5949412154', 'address_1' => 'Add 1', @@ -403,4 +422,3 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase { return array($headers, $rows); } } -