<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testMembershipTypeScenario1() {
+ public function testMembershipTypeScenario1() {
// Scenario 1
// Rollover Date < Start Date
// Join Date > Rollover Date and Join Date < Start Date
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$this->type('name', "Membership Type $title");
- $this->select2('member_of_contact_id',$title);
+ $this->select2('member_of_contact_id', $title);
$this->type('minimum_fee', '100');
- $this->select( 'financial_type_id', 'value=2' );
+ $this->select('financial_type_id', 'value=2');
$this->type('duration_interval', 1);
$this->select('duration_unit', "label=year");
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
+ $this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
require_once 'CRM/Core/Config.php';
require_once 'CRM/Utils/Array.php';
require_once 'CRM/Utils/Date.php';
- $currentYear = date('Y');
+ $currentYear = date('Y');
$currentMonth = date('m');
$previousYear = $currentYear - 1;
- $nextYear = $currentYear + 1;
+ $nextYear = $currentYear + 1;
$todayDate = date('Y-m-d');
$configVars = new CRM_Core_Config_Variables();
foreach (array(
- 'joinDate', 'startDate', 'endDate') as $date) {
+ 'joinDate',
+ 'startDate',
+ 'endDate',
+ ) as $date) {
$$date = CRM_Utils_Date::customFormat($$date, $configVars->dateformatFull);
}
);
}
- function testMembershipTypeScenario2() {
+ public function testMembershipTypeScenario2() {
// Scenario 2
// Rollover Date < Join Date
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$this->type('name', "Membership Type $title");
- $this->select2('member_of_contact_id',$title);
+ $this->select2('member_of_contact_id', $title);
$this->type('minimum_fee', '100');
- $this->select( 'financial_type_id', 'value=2' );
+ $this->select('financial_type_id', 'value=2');
$this->type('duration_interval', 2);
$this->select('duration_unit', "label=year");
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
+ $this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
require_once 'CRM/Core/Config.php';
require_once 'CRM/Utils/Array.php';
require_once 'CRM/Utils/Date.php';
- $currentYear = date('Y');
+ $currentYear = date('Y');
$currentMonth = date('m');
$previousYear = $currentYear - 1;
$endDate = date('Y-m-d', mktime(0, 0, 0, 8, 31, $currentYear + 2));
$configVars = new CRM_Core_Config_Variables();
foreach (array(
- 'joinDate', 'startDate', 'endDate') as $date) {
+ 'joinDate',
+ 'startDate',
+ 'endDate',
+ ) as $date) {
$$date = CRM_Utils_Date::customFormat($$date, $configVars->dateformatFull);
}
);
}
- function testMembershipTypeScenario3() {
+ public function testMembershipTypeScenario3() {
// Scenario 3
// Standard Fixed scenario - Jan 1 Fixed Period Start and October 31 rollover
// Join Date is later than Rollover Date
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$this->type('name', "Membership Type $title");
- $this->select2('member_of_contact_id',$title);
+ $this->select2('member_of_contact_id', $title);
$this->type('minimum_fee', '100');
- $this->select( 'financial_type_id', 'value=2' );
+ $this->select('financial_type_id', 'value=2');
$this->type('duration_interval', 1);
$this->select('duration_unit', "label=year");
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
+ $this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$firstName = "John_" . substr(sha1(rand()), 0, 7);
require_once 'CRM/Core/Config.php';
require_once 'CRM/Utils/Array.php';
require_once 'CRM/Utils/Date.php';
- $currentYear = date('Y');
+ $currentYear = date('Y');
$currentMonth = date('m');
$previousYear = $currentYear - 1;
- $nextYear = $currentYear + 1;
- $todayDate = date('Y-m-d');
- $joinDate = date('Y-m-d', mktime(0, 0, 0, 11, 15, $currentYear));
- $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $currentYear));
- $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $nextYear));
- $configVars = new CRM_Core_Config_Variables();
+ $nextYear = $currentYear + 1;
+ $todayDate = date('Y-m-d');
+ $joinDate = date('Y-m-d', mktime(0, 0, 0, 11, 15, $currentYear));
+ $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $currentYear));
+ $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $nextYear));
+ $configVars = new CRM_Core_Config_Variables();
foreach (array(
- 'joinDate', 'startDate', 'endDate') as $date) {
+ 'joinDate',
+ 'startDate',
+ 'endDate',
+ ) as $date) {
$$date = CRM_Utils_Date::customFormat($$date, $configVars->dateformatFull);
}
);
}
- function testMembershipTypeScenario4() {
+ public function testMembershipTypeScenario4() {
// Scenario 4
// Standard Fixed scenario - Jan 1 Fixed Period Start and October 31 rollover
// Join Date is earlier than Rollover Date
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$this->type('name', "Membership Type $title");
- $this->select2('member_of_contact_id',$title);
+ $this->select2('member_of_contact_id', $title);
$this->type('minimum_fee', '100');
- $this->select( 'financial_type_id', 'value=2' );
+ $this->select('financial_type_id', 'value=2');
$this->type('duration_interval', 1);
$this->select('duration_unit', "label=year");
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
+ $this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
require_once 'CRM/Core/Config.php';
require_once 'CRM/Utils/Array.php';
require_once 'CRM/Utils/Date.php';
- $currentYear = date('Y');
+ $currentYear = date('Y');
$currentMonth = date('m');
- $nextYear = $currentYear + 1;
- $todayDate = date('Y-m-d');
+ $nextYear = $currentYear + 1;
+ $todayDate = date('Y-m-d');
// the member-since date we will type in to membership form
$joinDate = date('Y-m-d', mktime(0, 0, 0, 1, 15, $currentYear));
// expected calc'd start and end dates
- $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $currentYear));
- $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $currentYear));
+ $startDate = date('Y-m-d', mktime(0, 0, 0, 1, 1, $currentYear));
+ $endDate = date('Y-m-d', mktime(0, 0, 0, 12, 31, $currentYear));
$configVars = new CRM_Core_Config_Variables();
foreach (array(
- 'joinDate', 'startDate', 'endDate') as $date) {
+ 'joinDate',
+ 'startDate',
+ 'endDate',
+ ) as $date) {
$$date = CRM_Utils_Date::customFormat($$date, $configVars->dateformatFull);
}
)
);
}
-}
+}