}
/**
- * Test case for retrieve( )
- * test with all values.
+ * Test case for retrieve( ).
+ *
+ * Test with all values.
*/
public function testRetrieve() {
//take the common contact params
}
/**
- * Test case for deleteContact( )
+ * Test case for deleteContact( ).
*/
public function testDeleteContact() {
$contactParams = $this->contactParams();
}
/**
- * Test case for getPrimaryOpenId( )
+ * Test case for getPrimaryOpenId( ).
*/
public function testGetPrimaryOpenId() {
//get the contact params
}
/**
- * Test case for matchContactOnEmail( )
+ * Test case for matchContactOnEmail( ).
*/
public function testMatchContactOnEmail() {
//get the contact params
}
/**
- * Test case for getContactType( )
+ * Test case for getContactType( ).
*/
public function testGetContactType() {
//get the contact params
}
/**
- * Test case for displayName( )
+ * Test case for displayName( ).
*/
public function testDisplayName() {
//get the contact params
}
/**
- * Test case for getDisplayAndImage( )
+ * Test case for getDisplayAndImage( ).
*/
public function testGetDisplayAndImage() {
//get the contact params
}
/**
- * Build common params
+ * Build common params.
*/
private function contactParams() {
}
/**
- * Ensure that civicrm_contact.modified_date is updated when manipulating an email
+ * Ensure that civicrm_contact.modified_date is updated when manipulating an email.
*/
public function testTimestamps_phone() {
$test = $this;
}
/**
+ * Test end date email sent.
+ *
* For contacts/members which match schedule based on join date,
* an email should be sent.
*/
}
/**
- * Test that the first and SECOND notifications are sent out
+ * Test that the first and SECOND notifications are sent out.
*/
public function testMembershipEndDate_Repeat() {
// creates membership with end_date = 20120615
}
/**
+ * Test behaviour when date changes.
+ *
* Test that the first notification is sent but the second is NOT sent if the end date changes in
* between
* see CRM-15376
),
));
- //extend membership - reminder should NOT go out
+ // Extend membership - reminder should NOT go out.
$this->callAPISuccess('membership', 'create', array('id' => $membership->id, 'end_date' => '2014-01-01'));
$this->assertCronRuns(array(
- array(// After the 2-week mark, send an email
+ array(
+ // After the 2-week mark, send an email.
'time' => '2012-09-12 01:00:00',
'recipients' => array(),
),
}
/**
+ * Test membership end date email sends.
+ *
* For contacts/members which match schedule based on end date,
* an email should be sent.
*/
// end_date=2012-06-15 ; schedule is 2 weeks before end_date
$this->assertCronRuns(array(
- array(// Before the 2-week mark, no email
+ array(
+ // Before the 2-week mark, no email.
'time' => '2012-05-31 01:00:00',
- // 'time' => '2012-06-01 01:00:00', // FIXME: Is this the right boundary?
+ // 'time' => '2012-06-01 01:00:00',
+ // FIXME: Is this the right boundary?
'recipients' => array(),
),
- array(// After the 2-week mark, send an email
+ array(
+ // After the 2-week mark, send an email.
'time' => '2012-06-01 01:00:00',
'recipients' => array(array('test-member@example.com')),
),
/**
+ * Test membership end date email.
+ *
* For contacts/members which match schedule based on end date,
* an email should be sent.
*/
// end_date=2012-06-15 ; schedule is 2 weeks before end_date
$this->assertCronRuns(array(
- array(// Before the 2-week mark, no email
+ array(
+ // Before the 2-week mark, no email.
'time' => '2012-05-31 01:00:00',
- // 'time' => '2012-06-01 01:00:00', // FIXME: Is this the right boundary?
+ // 'time' => '2012-06-01 01:00:00',
+ // FIXME: Is this the right boundary?
'recipients' => array(),
),
- array(// After the 2-week mark, send an email
+ array(
+ // After the 2-week mark, send an email.
'time' => '2013-05-01 01:00:00',
'recipients' => array(),
),
$actionScheduleDao = CRM_Core_BAO_ActionSchedule::add($actionSchedule);
$this->assertTrue(is_numeric($actionScheduleDao->id));
$this->assertCronRuns(array(
- array(// On the birthday, no email
+ array(
+ // On the birthday, no email.
'time' => '2005-07-07 01:00:00',
'recipients' => array(),
),
- array(// The next day, send an email
+ array(
+ // The next day, send an email.
'time' => '2005-07-08 20:00:00',
'recipients' => array(array('test-bday@example.com')),
),
));
}
- public function testContactBirthDate_Anniv() {
+ public function testContactBirthDate_Anniversary() {
$contact = $this->callAPISuccess('Contact', 'create', $this->fixtures['contact_birthdate']);
$this->_testObjects['CRM_Contact_DAO_Contact'][] = $contact['id'];
$actionSchedule = $this->fixtures['sched_contact_bday_anniv'];
}
/**
- * Test note created correctly
+ * Test note created correctly.
*/
public function testCreateContributionWithNote() {
$description = "Demonstrates creating contribution with Note Entity";
'contact_type' => 'Individual',
));
$params = $this->_params + array(
- 'soft_credit_to' => $contact2['id'],
- );
+ 'soft_credit_to' => $contact2['id'],
+ );
$contribution = $this->callAPIAndDocument('contribution', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
$result = $this->callAPISuccess('contribution', 'get', array('return' => 'soft_credit', 'sequential' => 1));
'contact_type' => 'Individual',
));
$params = $this->_params + array(
- 'honor_contact_id' => $contact2['id'],
- );
+ 'honor_contact_id' => $contact2['id'],
+ );
$contribution = $this->callAPIAndDocument('contribution', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
$result = $this->callAPISuccess('contribution', 'get', array('return' => 'soft_credit', 'sequential' => 1));
}
/**
- * Test using example code
+ * Test using example code.
*/
public function testContributionCreateExample() {
//make sure at least on page exists since there is a truncate in tear down
/**
- * Function tests that additional financial records are created when online contribution is created
+ * Function tests that additional financial records are created when online contribution is created.
*/
public function testCreateContributionOnline() {
CRM_Financial_BAO_PaymentProcessor::create($this->_processorParams);
}
/**
+ * Check handling of financial type.
+ *
* In the interests of removing financial type / contribution type checks from
* legacy format function lets test that the api is doing this for us
*/
}
/**
+ * Check handling of financial type.
+ *
* In the interests of removing financial type / contribution type checks from
* legacy format function lets test that the api is doing this for us
*/