X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FImport%2FDateFormatTest.php;h=eae2de4f0b13ef702b8add38aa6dbd3f2d74fd58;hb=867970063f640edd408f4eb2fb3fcd8db2761f1b;hp=e9482ef591674ce8015b2af4b19c43e2bc20fed4;hpb=fc39f196c427ec3f13f2a240967bd36f426e9609;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Import/DateFormatTest.php b/tests/phpunit/WebTest/Import/DateFormatTest.php index e9482ef591..eae2de4f0b 100644 --- a/tests/phpunit/WebTest/Import/DateFormatTest.php +++ b/tests/phpunit/WebTest/Import/DateFormatTest.php @@ -1,9 +1,9 @@ webtestLogin(); // Get sample import data. @@ -50,10 +50,10 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other); } - /* + /** * Test contact import for mm_dd_yy date format. */ - function testDateFormat_mm_dd_yy() { + public function testDateFormat_mm_dd_yy() { $this->webtestLogin(); // Get sample import data. @@ -66,10 +66,10 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other); } - /* + /** * Test contact import for mm_dd_yyyy date format. */ - function testDateFormat_mm_dd_yyyy() { + public function testDateFormat_mm_dd_yyyy() { // Logging in. Remember to wait for page to load. In most cases, // you can rely on 30000 as the value that allows your test to pass, however, // sometimes your test might fail because of this. In such cases, it's better to pick one element @@ -87,10 +87,10 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other); } - /* + /** * Test contact import for Month_dd_yyyy date format. */ - function testDateFormat_Month_dd_yyyy() { + public function testDateFormat_Month_dd_yyyy() { // Logging in. Remember to wait for page to load. In most cases, // you can rely on 30000 as the value that allows your test to pass, however, // sometimes your test might fail because of this. In such cases, it's better to pick one element @@ -108,10 +108,10 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other); } - /* + /** * Test contact import for dd_mon_yy date format. */ - function testDateFormat_dd_mon_yy() { + public function testDateFormat_dd_mon_yy() { // Logging in. Remember to wait for page to load. In most cases, // you can rely on 30000 as the value that allows your test to pass, however, // sometimes your test might fail because of this. In such cases, it's better to pick one element @@ -129,10 +129,10 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other); } - /* + /** * Test contact import for dd_mm_yyyy date format. */ - function testDateFormat_dd_mm_yyyy() { + public function testDateFormat_dd_mm_yyyy() { // Logging in. Remember to wait for page to load. In most cases, // you can rely on 30000 as the value that allows your test to pass, however, // sometimes your test might fail because of this. In such cases, it's better to pick one element @@ -150,13 +150,13 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { $this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other); } - /* + /** * Helper function to provide data for contact import for Individuals and yyyy-mm-dd OR yyyymmdd dateformat. */ /** * @return array */ - function _individualCSVData_yyyy_mm_dd() { + public function _individualCSVData_yyyy_mm_dd() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -172,7 +172,8 @@ class WebTest_Import_DateFormatTest 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', @@ -181,10 +182,11 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '1998-12-25', ), - 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', @@ -193,7 +195,7 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '1999-11-26', ), ); @@ -201,13 +203,13 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { return array($headers, $rows); } - /* + /** * Helper function to provide data for contact import for Individuals and mm/dd/yy OR mm-dd-yy dateformat. */ /** * @return array */ - function _individualCSVData_mm_dd_yy() { + public function _individualCSVData_mm_dd_yy() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -223,7 +225,8 @@ class WebTest_Import_DateFormatTest 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', @@ -232,10 +235,11 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '12/23/98', ), - 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', @@ -244,7 +248,7 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '11/24/88', ), ); @@ -252,13 +256,13 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { return array($headers, $rows); } - /* + /** * Helper function to provide data for contact import for Individuals and mm/dd/yyyy OR mm-dd-yyyy dateformat. */ /** * @return array */ - function _individualCSVData_mm_dd_yyyy() { + public function _individualCSVData_mm_dd_yyyy() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -274,7 +278,8 @@ class WebTest_Import_DateFormatTest 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', @@ -283,10 +288,11 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '11/12/1995', ), - 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', @@ -295,7 +301,7 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '12/12/1995', ), ); @@ -303,13 +309,13 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { return array($headers, $rows); } - /* + /** * Helper function to provide data for contact import for Individuals and Month dd, yyyy dateformat. */ /** * @return array */ - function _individualCSVData_Month_dd_yyyy() { + public function _individualCSVData_Month_dd_yyyy() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -325,7 +331,8 @@ class WebTest_Import_DateFormatTest 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', @@ -334,10 +341,11 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => 'December 12, 1998', ), - 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', @@ -346,7 +354,7 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => 'December 13, 1998', ), ); @@ -354,13 +362,13 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { return array($headers, $rows); } - /* + /** * Helper function to provide data for contact import for Individuals and dd-mon-yy OR dd/mm/yy dateformat. */ /** * @return array */ - function _individualCSVData_dd_mon_yy() { + public function _individualCSVData_dd_mon_yy() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -376,7 +384,8 @@ class WebTest_Import_DateFormatTest 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', @@ -385,10 +394,11 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '25/12/98', ), - 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', @@ -397,7 +407,7 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '26/12/99', ), ); @@ -405,13 +415,13 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { return array($headers, $rows); } - /* + /** * Helper function to provide data for contact import for Individuals and dd/mm/yyyy dateformat. */ /** * @return array */ - function _individualCSVData_dd_mm_yyyy() { + public function _individualCSVData_dd_mm_yyyy() { $headers = array( 'first_name' => 'First Name', 'middle_name' => 'Middle Name', @@ -427,7 +437,8 @@ class WebTest_Import_DateFormatTest 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', @@ -436,10 +447,11 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '25/12/1998', ), - 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', @@ -448,12 +460,12 @@ class WebTest_Import_DateFormatTest extends ImportCiviSeleniumTestCase { 'address_2' => 'Add 2', 'city' => 'Watson', 'state' => 'NY', - 'country' => 'United States', + 'country' => 'UNITED STATES', 'birth_date' => '24/11/1996', ), ); return array($headers, $rows); } -} +}