comment fixes
authorEileen McNaughton <eileen@fuzion.co.nz>
Thu, 15 Jan 2015 07:25:34 +0000 (20:25 +1300)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 15 Jan 2015 07:25:34 +0000 (20:25 +1300)
tests/phpunit/CRM/Contact/BAO/ContactTest.php
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php
tests/phpunit/WebTest/Event/MultiprofileEventTest.php
tests/phpunit/api/v3/ContributionTest.php

index eeec7c878ab6de8844bada15fdc08fd036f9e838..8e8b9d07b90839f9c67ababedf2fc743adb1ed32 100644 (file)
@@ -533,8 +533,9 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for retrieve( )
-   * test with all values.
+   * Test case for retrieve( ).
+   *
+   * Test with all values.
    */
   public function testRetrieve() {
     //take the common contact params
@@ -632,7 +633,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for deleteContact( )
+   * Test case for deleteContact( ).
    */
   public function testDeleteContact() {
     $contactParams = $this->contactParams();
@@ -1181,7 +1182,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for getPrimaryOpenId( )
+   * Test case for getPrimaryOpenId( ).
    */
   public function testGetPrimaryOpenId() {
     //get the contact params
@@ -1205,7 +1206,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for matchContactOnEmail( )
+   * Test case for matchContactOnEmail( ).
    */
   public function testMatchContactOnEmail() {
     //get the contact params
@@ -1226,7 +1227,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for getContactType( )
+   * Test case for getContactType( ).
    */
   public function testGetContactType() {
     //get the contact params
@@ -1245,7 +1246,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for displayName( )
+   * Test case for displayName( ).
    */
   public function testDisplayName() {
     //get the contact params
@@ -1272,7 +1273,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test case for getDisplayAndImage( )
+   * Test case for getDisplayAndImage( ).
    */
   public function testGetDisplayAndImage() {
     //get the contact params
@@ -1301,7 +1302,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * Build common params
+   * Build common params.
    */
   private function contactParams() {
 
@@ -1451,7 +1452,7 @@ class CRM_Contact_BAO_ContactTest extends CiviUnitTestCase {
   }
 
   /**
-   * 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;
index 2baeca519230e3731ab968e6453b5b17ccb39053..8c06c18affb8056e5a073e82757bc5daeea2502d 100644 (file)
@@ -545,6 +545,8 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
   }
 
   /**
+   * Test end date email sent.
+   *
    * For contacts/members which match schedule based on join date,
    * an email should be sent.
    */
@@ -576,7 +578,7 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
   }
 
   /**
-   * 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
@@ -607,6 +609,8 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
   }
 
   /**
+   * 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
@@ -632,10 +636,11 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
       ),
     ));
 
-    //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(),
       ),
@@ -643,6 +648,8 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
   }
 
   /**
+   * Test membership end date email sends.
+   *
    * For contacts/members which match schedule based on end date,
    * an email should be sent.
    */
@@ -663,12 +670,15 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
 
     // 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')),
       ),
@@ -677,6 +687,8 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
 
 
   /**
+   * Test membership end date email.
+   *
    * For contacts/members which match schedule based on end date,
    * an email should be sent.
    */
@@ -697,12 +709,15 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
 
     // 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(),
       ),
@@ -716,18 +731,20 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
     $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'];
index 7ec493e19b60bd5ab2bd53b8cdbb8986e0f83a26..86a26e0cf65bd5d42af658c3204afa14c96345db 100644 (file)
@@ -557,6 +557,8 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase {
   }
 
   /**
+   * Test adding multiple profiles.
+   *
    * @param int $profileId
    *
    * @return null
index d81c7a952c17cd9f58288a57c8b0adce313c4afc..6ab4bed8e045918a31bf6f525795713d183064b0 100644 (file)
@@ -586,7 +586,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   /**
-   * Test note created correctly
+   * Test note created correctly.
    */
   public function testCreateContributionWithNote() {
     $description = "Demonstrates creating contribution with Note Entity";
@@ -680,8 +680,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
       '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));
 
@@ -702,8 +702,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
       '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));
 
@@ -718,7 +718,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   /**
-   *  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
@@ -782,7 +782,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
 
 
   /**
-   * 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);
@@ -814,6 +814,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   /**
+   * 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
    */
@@ -824,6 +826,8 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
   }
 
   /**
+   * 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
    */