*/
public function testFormRuleRollingEarlyStart() {
$unixNow = time();
- $ymdNow = date('m/d/Y', $unixNow);
$unixYesterday = $unixNow - (24 * 60 * 60);
- $ymdYesterday = date('m/d/Y', $unixYesterday);
+ $ymdYesterday = date('Y-m-d', $unixYesterday);
$params = array(
- 'join_date' => $ymdNow,
+ 'join_date' => date('Y-m-d'),
'start_date' => $ymdYesterday,
'end_date' => '',
'membership_type_id' => array('23', '15'),
*/
public function testFormRuleRollingEarlyEnd() {
$unixNow = time();
- $ymdNow = date('m/d/Y', $unixNow);
$unixYesterday = $unixNow - (24 * 60 * 60);
- $ymdYesterday = date('m/d/Y', $unixYesterday);
+ $ymdYesterday = date('Y-m-d', $unixYesterday);
$params = array(
- 'join_date' => $ymdNow,
- 'start_date' => $ymdNow,
+ 'join_date' => date('Y-m-d'),
+ 'start_date' => date('Y-m-d'),
'end_date' => $ymdYesterday,
'membership_type_id' => array('23', '15'),
);
*/
public function testFormRuleRollingEndNoStart() {
$unixNow = time();
- $ymdNow = date('m/d/Y', $unixNow);
$unixYearFromNow = $unixNow + (365 * 24 * 60 * 60);
- $ymdYearFromNow = date('m/d/Y', $unixYearFromNow);
+ $ymdYearFromNow = date('Y-m-d', $unixYearFromNow);
$params = array(
- 'join_date' => $ymdNow,
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => $ymdYearFromNow,
'membership_type_id' => array('23', '15'),
$unixNow = time();
$unixYearFromNow = $unixNow + (365 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unixNow),
- 'start_date' => date('m/d/Y', $unixNow),
- 'end_date' => date('m/d/Y',
+ 'join_date' => date('Y-m-d'),
+ 'start_date' => date('Y-m-d'),
+ 'end_date' => date('Y-m-d',
$unixYearFromNow
),
'membership_type_id' => array('23', '25'),
public function testFormRulePermanentOverrideWithNoStatus() {
$unixNow = time();
$params = array(
- 'join_date' => date('m/d/Y', $unixNow),
+ 'join_date' => date('Y-m-d'),
'membership_type_id' => array('23', '25'),
'is_override' => TRUE,
);
public function testFormRuleUntilDateOverrideWithValidOverrideEndDate() {
$params = array(
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'membership_type_id' => array('23', '25'),
'is_override' => TRUE,
'status_id' => 1,
- 'status_override_end_date' => date('m/d/Y', time()),
+ 'status_override_end_date' => date('Y-m-d'),
);
$files = array();
$membershipForm = new CRM_Member_Form_Membership();
public function testFormRuleUntilDateOverrideWithNoOverrideEndDate() {
$params = array(
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'membership_type_id' => array('23', '25'),
'is_override' => CRM_Member_StatusOverrideTypes::UNTIL_DATE,
'status_id' => 1,
$unixNow = time();
$unix1MFmNow = $unixNow + (31 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unix1MFmNow),
+ 'join_date' => date('Y-m-d', $unix1MFmNow),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '15'),
* Test CRM_Member_Form_Membership::formRule() with a join date of today and a rolling membership type.
*/
public function testFormRuleRollingJoinToday() {
- $unixNow = time();
$params = array(
- 'join_date' => date('m/d/Y', $unixNow),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '15'),
$unixNow = time();
$unix1MAgo = $unixNow - (31 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unix1MAgo),
+ 'join_date' => date('Y-m-d', $unix1MAgo),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '15'),
$unixNow = time();
$unix6MAgo = $unixNow - (180 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unix6MAgo),
+ 'join_date' => date('Y-m-d', $unix6MAgo),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '15'),
$unixNow = time();
$unix1YAgo = $unixNow - (370 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unix1YAgo),
+ 'join_date' => date('Y-m-d', $unix1YAgo),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '15'),
$unixNow = time();
$unix2YAgo = $unixNow - (2 * 365 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unix2YAgo),
+ 'join_date' => date('Y-m-d', $unix2YAgo),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '15'),
$unixNow = time();
$unix6MAgo = $unixNow - (180 * 24 * 60 * 60);
$params = array(
- 'join_date' => date('m/d/Y', $unix6MAgo),
+ 'join_date' => date('Y-m-d', $unix6MAgo),
'start_date' => '',
'end_date' => '',
'membership_type_id' => array('23', '7'),
CRM_Price_BAO_PriceSet::buildPriceSet($form);
$params = array(
'cid' => $this->_individualId,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
// This format reflects the 23 being the organisation & the 25 being the type.
$form->_action = CRM_Core_Action::UPDATE;
$params = array(
'cid' => $this->_individualId,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
// This format reflects the 23 being the organisation & the 25 being the type.
CRM_Price_BAO_PriceSet::buildPriceSet($form);
$params = array(
'cid' => $this->_individualId,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
// This format reflects the 23 being the organisation & the 25 being the type.
$this->createLoggedInUser();
$params = array(
'cid' => $this->_individualId,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
// This format reflects the 23 being the organisation & the 25 being the type.
$params = array(
'cid' => $this->_individualId,
'price_set_id' => 0,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
'campaign_id' => '',
// register for both of these memberships via backoffice membership form submission
$params = array(
'cid' => $contactId,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
// This format reflects the 23 being the organisation & the 25 being the type.
$form->_priceSet = current(CRM_Price_BAO_PriceSet::getSetDetail($priceSet['id']));
$params = array(
'cid' => $this->_individualId,
- 'join_date' => date('m/d/Y', time()),
+ 'join_date' => date('Y-m-d'),
'start_date' => '',
'end_date' => '',
// This format reflects the 23 being the organisation & the 25 being the type.