<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| 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 contact import for yyyy_mm_dd date format.
*/
- function testDateFormat_yyyy_mm_dd() {
+ public function testDateFormat_yyyy_mm_dd() {
$this->webtestLogin();
// Get sample import data.
$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.
$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
$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
$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
$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
$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',
);
$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',
'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',
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'birth_date' => '1999-11-26',
),
);
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',
);
$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',
'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',
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'birth_date' => '11/24/88',
),
);
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',
);
$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',
'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',
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'birth_date' => '12/12/1995',
),
);
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',
);
$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',
'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',
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'birth_date' => 'December 13, 1998',
),
);
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',
);
$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',
'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',
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'birth_date' => '26/12/99',
),
);
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',
);
$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',
'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',
'address_2' => 'Add 2',
'city' => 'Watson',
'state' => 'NY',
- 'country' => 'United States',
+ 'country' => 'UNITED STATES',
'birth_date' => '24/11/1996',
),
);
return array($headers, $rows);
}
-}
+}