test tweaks and updated examples
authoreileen <eileen@fuzion.co.nz>
Sat, 3 Aug 2013 07:05:41 +0000 (19:05 +1200)
committereileen <eileen@fuzion.co.nz>
Sat, 3 Aug 2013 23:53:00 +0000 (11:53 +1200)
68 files changed:
api/v3/examples/Activity/ContactRefCustomField.php
api/v3/examples/Activity/ContactRefCustomFieldGet.php
api/v3/examples/Activity/DateTimeHigh.php
api/v3/examples/Activity/DateTimeLow.php
api/v3/examples/Activity/GetTargetandAssignee.php
api/v3/examples/Activity/ReturnAssigneeContact.php
api/v3/examples/ActivityCreate.php
api/v3/examples/ActivityGet.php
api/v3/examples/BatchCreate.php
api/v3/examples/BatchUpdate.php
api/v3/examples/Contact/APIChainedArray.php
api/v3/examples/Contact/APIChainedArrayFormats.php
api/v3/examples/Contact/APIChainedArrayMultipleCustom.php
api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php
api/v3/examples/Contact/ChainTwoWebsites.php
api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php
api/v3/examples/Contact/GetFieldsOptions.php
api/v3/examples/Contact/GetSingleContact.php
api/v3/examples/Contact/GroupFilterUsingContactAPI.php
api/v3/examples/ContactCreate.php
api/v3/examples/ContactGet.php
api/v3/examples/Contribution/ContributionCreateWithNote.php
api/v3/examples/Contribution/CreateWithNestedLineItems.php
api/v3/examples/ContributionPageCreate.php
api/v3/examples/ContributionRecurCreate.php
api/v3/examples/ContributionRecurGet.php
api/v3/examples/CustomGroupCreate.php
api/v3/examples/Email/NestedReplaceEmail.php
api/v3/examples/Event/IsFullOption.php
api/v3/examples/EventCreate.php
api/v3/examples/EventGet.php
api/v3/examples/GrantCreate.php
api/v3/examples/GrantGet.php
api/v3/examples/GroupContact/GetWithGroupID.php
api/v3/examples/GroupGet.php
api/v3/examples/LocBlockCreateEntities.php
api/v3/examples/MailingCreate.php
api/v3/examples/MailingGroupSubscribe.php
api/v3/examples/Membership/filterIsCurrent.php
api/v3/examples/MembershipCreate.php
api/v3/examples/MembershipGet.php
api/v3/examples/MembershipUpdate.php
api/v3/examples/Participant/CreateParticipantPayment.php
api/v3/examples/Participant/NestedDelete.php
api/v3/examples/Participant/NestedEventGet.php
api/v3/examples/ParticipantGet.php
api/v3/examples/Pledge/GetFilterHighDate.php
api/v3/examples/PledgeCreate.php
api/v3/examples/PledgeGet.php
api/v3/examples/PledgePaymentCreate.php
api/v3/examples/ProfileSet.php
api/v3/examples/Relationship/BetweenRelationshipType.php
api/v3/examples/Relationship/INRelationshipType.php
api/v3/examples/Relationship/NotBetweenRelationshipType.php
api/v3/examples/Relationship/NotInRelationshipType.php
api/v3/examples/Relationship/filterIsCurrent.php
api/v3/examples/RelationshipCreate.php
api/v3/examples/RelationshipGet.php
api/v3/examples/SurveyCreate.php
api/v3/examples/TagCreate.php
api/v3/examples/TagGet.php
api/v3/examples/UFFieldReplace.php
api/v3/examples/UFGroupCreate.php
api/v3/examples/UFGroupGet.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ActivityTest.php
tests/phpunit/api/v3/EventTest.php
tests/phpunit/api/v3/MailingGroupTest.php

index 812322f37b74e8edecbc5b9bbbad7d5b17ea8a63..b227a6a5308dd6128acc193f6b7d52af44042613 100644 (file)
@@ -1,11 +1,11 @@
 <?php
 /**
- * Test Generated example of using activity create API
+ * Test Generated example of using activity Create API
  * demonstrates create with Contact Reference Custom Field *
  */
 function activity_create_example(){
 $params = array(
-  'source_contact_id' => 17,
+  'source_contact_id' => 1,
   'activity_type_id' => '46',
   'subject' => 'test activity type id',
   'activity_date_time' => '2011-06-02 14:36:13',
@@ -14,11 +14,11 @@ $params = array(
   'duration' => 120,
   'location' => 'Pensulvania',
   'details' => 'a test activity',
-  'custom_2' => '17',
+  'custom_2' => '1',
 );
 
 try{
-  $result = civicrm_api3('activity', 'create', $params);
+  $result = civicrm_api3('activity', 'Create', $params);
 }
 catch (CiviCRM_API3_Exception $e) {
   // handle error here
index fb684c699243abc5d2ffeca2edacba87ac77ca42..25b80b455851e12ea6ee2380f5fbffb6193be86a 100644 (file)
@@ -1,24 +1,16 @@
 <?php
 /**
- * Test Generated example of using activity create API
+ * Test Generated example of using activity get API
  * Get with Contact Ref Custom Field *
  */
-function activity_create_example(){
+function activity_get_example(){
 $params = array(
-  'source_contact_id' => 17,
-  'activity_type_id' => '46',
-  'subject' => 'test activity type id',
-  'activity_date_time' => '2011-06-02 14:36:13',
-  'status_id' => 2,
-  'priority_id' => 1,
-  'duration' => 120,
-  'location' => 'Pensulvania',
-  'details' => 'a test activity',
-  'custom_2' => '17',
+  'return.custom_2' => 1,
+  'id' => 1,
 );
 
 try{
-  $result = civicrm_api3('activity', 'create', $params);
+  $result = civicrm_api3('activity', 'get', $params);
 }
 catch (CiviCRM_API3_Exception $e) {
   // handle error here
@@ -34,7 +26,7 @@ return $result;
 /**
  * Function returns array of result expected from previous function
  */
-function activity_create_expectedresult(){
+function activity_get_expectedresult(){
 
   $expectedResult = array(
   'is_error' => 0,
@@ -56,11 +48,11 @@ function activity_create_expectedresult(){
           'is_auto' => 0,
           'is_current_revision' => '1',
           'is_deleted' => 0,
-          'source_contact_id' => '17',
-          'custom_2_id' => '17',
-          'custom_2_1_id' => '17',
-          'custom_2' => 'Contact, Test',
-          'custom_2_1' => 'Contact, Test',
+          'source_contact_id' => '1',
+          'custom_2_id' => '1',
+          'custom_2_1_id' => '1',
+          'custom_2' => 'Anderson, Anthony',
+          'custom_2_1' => 'Anderson, Anthony',
         ),
     ),
 );
index e5b1d9840281af75c0a7bac7d82746eb3fcc5131..1242157cef9f5b0480a117efea6481757557a1a1 100644 (file)
@@ -5,7 +5,7 @@
  */
 function activity_get_example(){
 $params = array(
-  'source_contact_id' => 17,
+  'source_contact_id' => 1,
   'filter.activity_date_time_high' => '20120101000000',
   'sequential' => 1,
 );
@@ -49,7 +49,7 @@ function activity_get_expectedresult(){
           'is_auto' => 0,
           'is_current_revision' => '1',
           'is_deleted' => 0,
-          'source_contact_id' => '17',
+          'source_contact_id' => '1',
         ),
     ),
 );
index 06112d8e66d2416d4cdb1caa52634ba87b22e7c7..d191789f87c22dfa55e5bfab3fed60d9c2cf18ef 100644 (file)
@@ -48,7 +48,7 @@ function activity_get_expectedresult(){
           'is_auto' => 0,
           'is_current_revision' => '1',
           'is_deleted' => 0,
-          'source_contact_id' => '17',
+          'source_contact_id' => '1',
         ),
     ),
 );
index 8b83ea741d7b7ff1089015d8fbd5dbb9142a4ef6..e6b7027e23a45a43d8db0d9934ad9e5b0bac625f 100644 (file)
@@ -5,7 +5,7 @@
  */
 function activity__example(){
 $params = array(
-  'source_contact_id' => 17,
+  'source_contact_id' => 1,
   'subject' => 'Make-it-Happen Meeting',
   'activity_date_time' => '20110316',
   'duration' => 120,
@@ -14,8 +14,8 @@ $params = array(
   'status_id' => 1,
   'activity_type_id' => 1,
   'priority_id' => 1,
-  'target_contact_id' => 17,
-  'assignee_contact_id' => 17,
+  'target_contact_id' => 1,
+  'assignee_contact_id' => 1,
 );
 
 try{
index dd5f9042398dce67d7450f58a744b56cd5f9a079..a9be1fcddc5a7b3ddd43b8fc8914d5f7a89d4815 100644 (file)
@@ -53,36 +53,36 @@ function activity_get_expectedresult(){
           'is_current_revision' => '1',
           'is_deleted' => 0,
           'assignee_contact_id' => array(
-              '0' => '19',
+              '0' => '3',
             ),
-          'source_contact_id' => '17',
+          'source_contact_id' => '1',
           'api.contact.get' => array(
               'is_error' => 0,
               'version' => 3,
               'count' => 1,
-              'id' => 17,
+              'id' => 1,
               'values' => array(
                   '0' => array(
-                      'contact_id' => '17',
+                      'contact_id' => '1',
                       'contact_type' => 'Individual',
                       'contact_sub_type' => '',
-                      'sort_name' => '',
-                      'display_name' => 'Test Contact',
-                      'do_not_email' => '',
-                      'do_not_phone' => '',
-                      'do_not_mail' => '',
-                      'do_not_sms' => '',
-                      'do_not_trade' => '',
+                      'sort_name' => 'Anderson, Anthony',
+                      'display_name' => 'Mr. Anthony Anderson II',
+                      'do_not_email' => 0,
+                      'do_not_phone' => 0,
+                      'do_not_mail' => 0,
+                      'do_not_sms' => 0,
+                      'do_not_trade' => 0,
                       'is_opt_out' => 0,
                       'legal_identifier' => '',
                       'external_identifier' => '',
                       'nick_name' => '',
                       'legal_name' => '',
                       'image_URL' => '',
-                      'preferred_mail_format' => '',
-                      'first_name' => 'Test',
-                      'middle_name' => '',
-                      'last_name' => 'Contact',
+                      'preferred_mail_format' => 'Both',
+                      'first_name' => 'Anthony',
+                      'middle_name' => 'J.',
+                      'last_name' => 'Anderson',
                       'job_title' => '',
                       'birth_date' => '',
                       'is_deceased' => 0,
@@ -102,22 +102,22 @@ function activity_get_expectedresult(){
                       'geo_code_1' => '',
                       'geo_code_2' => '',
                       'state_province_id' => '',
-                      'state_province_name' => '',
-                      'state_province' => '',
                       'country_id' => '',
-                      'country' => '',
                       'phone_id' => '',
                       'phone_type_id' => '',
                       'phone' => '',
-                      'email_id' => '',
-                      'email' => '',
-                      'on_hold' => '',
+                      'email_id' => '1',
+                      'email' => 'anthony_anderson@civicrm.org',
+                      'on_hold' => 0,
                       'im_id' => '',
                       'provider_id' => '',
                       'im' => '',
                       'worldregion_id' => '',
                       'world_region' => '',
-                      'id' => '17',
+                      'state_province_name' => '',
+                      'state_province' => '',
+                      'country' => '',
+                      'id' => '1',
                     ),
                 ),
             ),
index 38c3dd6ca1da43dff1063d14c929c5cdeef7f192..bd5f4c1d8580238127b119d3346dde6f891c486c 100644 (file)
@@ -5,7 +5,7 @@
  */
 function activity_create_example(){
 $params = array(
-  'source_contact_id' => 17,
+  'source_contact_id' => 1,
   'activity_type_id' => '46',
   'subject' => 'test activity type id',
   'activity_date_time' => '2011-06-02 14:36:13',
index ca2aec0e3000edff982ec6ada4cebb2e3c07c128..5b1dd1ac1ca696eae6438941b0ddc3bc93c050ff 100644 (file)
@@ -5,7 +5,7 @@
  */
 function activity_get_example(){
 $params = array(
-  'contact_id' => 17,
+  'contact_id' => 1,
   'activity_type_id' => '46',
   'sequential' => 1,
   'return.custom_1' => 1,
@@ -37,7 +37,7 @@ function activity_get_expectedresult(){
   'id' => 1,
   'values' => array(
       '0' => array(
-          'source_contact_id' => '17',
+          'source_contact_id' => '1',
           'id' => '1',
           'activity_type_id' => '46',
           'subject' => 'test activity type id',
index 7ab643f1156d6be209a6f22b4e5e3300289389a2..80976d11f81fd205301eb1ac4188a4e479dbc4cc 100644 (file)
@@ -44,9 +44,9 @@ function batch_create_expectedresult(){
           'title' => 'New Batch 03',
           'description' => 'This is description for New Batch 03',
           'created_id' => '',
-          'created_date' => '2013-07-28 08:49:19',
+          'created_date' => '',
           'modified_id' => '',
-          'modified_date' => '2012-11-14 16:02:35',
+          'modified_date' => '',
           'saved_search_id' => '',
           'status_id' => '1',
           'type_id' => '',
index ca87f7df19bd48fbfa11afb7725993cc8d0be154..453aa22521a69bd5e190d31ba5cc4e7bb08fcb1f 100644 (file)
@@ -44,9 +44,9 @@ function batch_update_expectedresult(){
           'title' => 'New Batch 04',
           'description' => 'This is description for New Batch 04',
           'created_id' => '',
-          'created_date' => '2013-07-28 08:49:19',
+          'created_date' => '',
           'modified_id' => '',
-          'modified_date' => '2012-11-14 16:02:35',
+          'modified_date' => '',
           'saved_search_id' => '',
           'status_id' => '',
           'type_id' => '',
index 4436fb8d27df8a0055d266c5b0fde8e41d6714bb..539f60bfb2ff6bfd440f4f21e8daf6ec4349188b 100644 (file)
@@ -79,10 +79,7 @@ function contact_get_expectedresult(){
           'geo_code_1' => '',
           'geo_code_2' => '',
           'state_province_id' => '',
-          'state_province_name' => '',
-          'state_province' => '',
           'country_id' => '',
-          'country' => '',
           'phone_id' => '',
           'phone_type_id' => '',
           'phone' => '',
@@ -94,6 +91,9 @@ function contact_get_expectedresult(){
           'im' => '',
           'worldregion_id' => '',
           'world_region' => '',
+          'state_province_name' => '',
+          'state_province' => '',
+          'country' => '',
           'id' => '1',
           'api.website.get' => array(
               'is_error' => 0,
index 02c3231881c3d0d5f69d7759b72e925a4111563c..e9c897a066ba6e61f77f2c218d81fcba8d0bcc92 100644 (file)
@@ -81,10 +81,7 @@ function contact_get_expectedresult(){
           'geo_code_1' => '',
           'geo_code_2' => '',
           'state_province_id' => '',
-          'state_province_name' => '',
-          'state_province' => '',
           'country_id' => '',
-          'country' => '',
           'phone_id' => '',
           'phone_type_id' => '',
           'phone' => '',
@@ -96,6 +93,9 @@ function contact_get_expectedresult(){
           'im' => '',
           'worldregion_id' => '',
           'world_region' => '',
+          'state_province_name' => '',
+          'state_province' => '',
+          'country' => '',
           'id' => '1',
           'api.website.getValue' => 'http://civicrm.org',
           'api.Contribution.getCount' => 2,
index 3409d3538acf421dc8be177008507130717e4a6c..b4fbab404c31d5ecd17132376270e5fac918ae9c 100644 (file)
@@ -78,10 +78,7 @@ function contact_get_expectedresult(){
           'geo_code_1' => '',
           'geo_code_2' => '',
           'state_province_id' => '',
-          'state_province_name' => '',
-          'state_province' => '',
           'country_id' => '',
-          'country' => '',
           'phone_id' => '',
           'phone_type_id' => '',
           'phone' => '',
@@ -93,6 +90,9 @@ function contact_get_expectedresult(){
           'im' => '',
           'worldregion_id' => '',
           'world_region' => '',
+          'state_province_name' => '',
+          'state_province' => '',
+          'country' => '',
           'id' => '1',
           'api.website.getValue' => 'http://civicrm.org',
           'api.Contribution.getCount' => 2,
index f4721e23b9b0065d50052bb92289a53757bd53df..2b374551587f3377c98acdbf8dfdcf04561d277b 100644 (file)
@@ -68,6 +68,8 @@ function contact_create_expectedresult(){
           'first_name' => '',
           'middle_name' => '',
           'last_name' => '',
+          'prefix_id' => '',
+          'suffix_id' => '',
           'email_greeting_id' => '1',
           'email_greeting_custom' => '',
           'email_greeting_display' => '',
index 54a3444fa40f7d5cb55c505f1c2e15c692c2929d..6b1880fb37da65d1d82e16ce43be96eec0a79786 100644 (file)
@@ -80,6 +80,8 @@ function contact_create_expectedresult(){
           'first_name' => 'abc3',
           'middle_name' => '',
           'last_name' => 'xyz3',
+          'prefix_id' => '',
+          'suffix_id' => '',
           'email_greeting_id' => '1',
           'email_greeting_custom' => '',
           'email_greeting_display' => '',
@@ -134,7 +136,7 @@ function contact_create_expectedresult(){
                       'contribution_status_id' => '1',
                       'honor_type_id' => '',
                       'address_id' => '',
-                      'check_number' => 'null',
+                      'check_number' => '',
                       'campaign_id' => '',
                       'contribution_type_id' => '1',
                     ),
index 5bc0f922faa53832a2052d0d0c935989002991eb..c5474b2d7513fe75ebf00dcd79e13cc91f690465 100644 (file)
@@ -83,6 +83,8 @@ function contact_create_expectedresult(){
           'first_name' => 'abc3',
           'middle_name' => '',
           'last_name' => 'xyz3',
+          'prefix_id' => '',
+          'suffix_id' => '',
           'email_greeting_id' => '1',
           'email_greeting_custom' => '',
           'email_greeting_display' => '',
@@ -137,7 +139,7 @@ function contact_create_expectedresult(){
                       'contribution_status_id' => '1',
                       'honor_type_id' => '',
                       'address_id' => '',
-                      'check_number' => 'null',
+                      'check_number' => '',
                       'campaign_id' => '',
                       'contribution_type_id' => '1',
                     ),
index 032ddc9c023b2a50c5ee7b2542aff0e0c27cb430..5605b345f34d31124e32d6a54346fdf0b042be6b 100644 (file)
@@ -308,6 +308,32 @@ function contact_getfields_expectedresult(){
           'dataPattern' => '/^\w+(\s\w+)?+$/',
           'export' => true,
         ),
+      'prefix_id' => array(
+          'name' => 'prefix_id',
+          'type' => 1,
+          'title' => 'Individual Prefix',
+          'import' => true,
+          'where' => 'civicrm_contact.prefix_id',
+          'headerPattern' => '/^(prefix|title)/i',
+          'dataPattern' => '/^(mr|ms|mrs|sir|dr)\.?$/i',
+          'export' => true,
+          'pseudoconstant' => array(
+              'optionGroupName' => 'individual_prefix',
+            ),
+        ),
+      'suffix_id' => array(
+          'name' => 'suffix_id',
+          'type' => 1,
+          'title' => 'Individual Suffix',
+          'import' => true,
+          'where' => 'civicrm_contact.suffix_id',
+          'headerPattern' => '/^suffix$/i',
+          'dataPattern' => '/^(sr|jr)\.?|i{2,}$/',
+          'export' => true,
+          'pseudoconstant' => array(
+              'optionGroupName' => 'individual_suffix',
+            ),
+        ),
       'email_greeting_id' => array(
           'name' => 'email_greeting_id',
           'type' => 1,
@@ -503,34 +529,6 @@ function contact_getfields_expectedresult(){
           'export' => true,
           'uniqueName' => 'contact_source',
         ),
-      'prefix_id' => array(
-          'name' => 'prefix_id',
-          'type' => 1,
-          'title' => 'Individual Prefix',
-          'import' => true,
-          'where' => 'civicrm_contact.prefix_id',
-          'headerPattern' => '/^(prefix|title)/i',
-          'dataPattern' => '/^(mr|ms|mrs|sir|dr)\.?$/i',
-          'export' => true,
-          'pseudoconstant' => array(
-              'optionGroupName' => 'individual_prefix',
-            ),
-          'uniqueName' => 'individual_prefix_id',
-        ),
-      'suffix_id' => array(
-          'name' => 'suffix_id',
-          'type' => 1,
-          'title' => 'Individual Suffix',
-          'import' => true,
-          'where' => 'civicrm_contact.suffix_id',
-          'headerPattern' => '/^suffix$/i',
-          'dataPattern' => '/^(sr|jr)\.?|i{2,}$/',
-          'export' => true,
-          'pseudoconstant' => array(
-              'optionGroupName' => 'individual_suffix',
-            ),
-          'uniqueName' => 'individual_suffix_id',
-        ),
       'employer_id' => array(
           'name' => 'employer_id',
           'type' => 1,
index 6b22a2f9a1ce5023dfd697024251051af12ccdb8..2df6565a5abfbc449e44dd0c433d9c8d3911cb1a 100644 (file)
@@ -69,10 +69,7 @@ function contact_getsingle_expectedresult(){
   'geo_code_1' => '',
   'geo_code_2' => '',
   'state_province_id' => '',
-  'state_province_name' => '',
-  'state_province' => '',
   'country_id' => '',
-  'country' => '',
   'phone_id' => '',
   'phone_type_id' => '',
   'phone' => '',
@@ -84,6 +81,9 @@ function contact_getsingle_expectedresult(){
   'im' => '',
   'worldregion_id' => '',
   'world_region' => '',
+  'state_province_name' => '',
+  'state_province' => '',
+  'country' => '',
   'id' => '17',
 );
 
index 3c76bda6af61f897f1327474a5bc6ee65ee7eb8f..42c6ab91db0cf0742ba6dfcbffe6f0521677c202 100644 (file)
@@ -77,10 +77,7 @@ function contact_get_expectedresult(){
           'geo_code_1' => '',
           'geo_code_2' => '',
           'state_province_id' => '',
-          'state_province_name' => '',
-          'state_province' => '',
           'country_id' => '',
-          'country' => '',
           'phone_id' => '',
           'phone_type_id' => '',
           'phone' => '',
@@ -92,6 +89,9 @@ function contact_get_expectedresult(){
           'im' => '',
           'worldregion_id' => '',
           'world_region' => '',
+          'state_province_name' => '',
+          'state_province' => '',
+          'country' => '',
           'id' => '1',
         ),
     ),
index 12bf3d8eddce67c5add9a8ca13f4afe480e287a9..0b7b39c699b3334881e8a967c90fdca432b29ffd 100644 (file)
@@ -61,6 +61,8 @@ function contact_create_expectedresult(){
           'first_name' => 'abc1',
           'middle_name' => '',
           'last_name' => 'xyz1',
+          'prefix_id' => '',
+          'suffix_id' => '',
           'email_greeting_id' => '1',
           'email_greeting_custom' => '',
           'email_greeting_display' => '',
index a597b7bbf8cca3207186a9ae26e5b51c74cbebec..5b6cd352edf95e050663b69e2891f854c740842b 100644 (file)
@@ -73,10 +73,7 @@ function contact_get_expectedresult(){
           'geo_code_1' => '',
           'geo_code_2' => '',
           'state_province_id' => '',
-          'state_province_name' => '',
-          'state_province' => '',
           'country_id' => '',
-          'country' => '',
           'phone_id' => '',
           'phone_type_id' => '',
           'phone' => '',
@@ -88,6 +85,9 @@ function contact_get_expectedresult(){
           'im' => '',
           'worldregion_id' => '',
           'world_region' => '',
+          'state_province_name' => '',
+          'state_province' => '',
+          'country' => '',
           'id' => '1',
         ),
     ),
index efd3a0c1bdfb35993a63fcd7fcdbb9ea12900a4b..dd139fea7716f3124dc781c1db178d8d8ceadbb0 100644 (file)
@@ -72,7 +72,7 @@ function contribution_create_expectedresult(){
           'contribution_status_id' => '1',
           'honor_type_id' => '',
           'address_id' => '',
-          'check_number' => 'null',
+          'check_number' => '',
           'campaign_id' => '',
           'contribution_type_id' => '1',
         ),
index 4f00ff18461ef8953fa78fafc5b996b99c48b6f4..4ad4565a66c092f0ab5047ca6c4eecc7b7ab7560 100644 (file)
@@ -86,7 +86,7 @@ function contribution_create_expectedresult(){
           'contribution_status_id' => '1',
           'honor_type_id' => '',
           'address_id' => '',
-          'check_number' => 'null',
+          'check_number' => '',
           'campaign_id' => '',
           'contribution_type_id' => '1',
           'api.line_item.create' => array(
index ae07948fb156de0ddc7871101b13f436abd1f13c..11be46d350651511f91b50a255281a3085bafaa2 100644 (file)
@@ -81,7 +81,7 @@ function contribution_page_create_expectedresult(){
           'start_date' => '',
           'end_date' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 08:49:19',
+          'created_date' => '',
           'currency' => 'NZD',
           'campaign_id' => '',
           'is_share' => '',
index c83fb85f74d27e3b4e2186bd506d565d6dc254df..6fe28ad389916df7de01ea9c9b127300311e9605 100644 (file)
@@ -48,9 +48,9 @@ function contribution_recur_create_expectedresult(){
           'frequency_unit' => 'day',
           'frequency_interval' => '1',
           'installments' => '12',
-          'start_date' => '20120101000000',
+          'start_date' => '2013-07-29 00:00:00',
           'create_date' => '20120130621222105',
-          'modified_date' => '2012-11-14 16:02:35',
+          'modified_date' => '',
           'cancel_date' => '',
           'end_date' => '',
           'processor_id' => '',
index 6158d65a30762bd18895aabc27ada37229dde9b2..4218e7458b88afbc87693f6f3f6bcb0fe5eb129d 100644 (file)
@@ -41,7 +41,7 @@ function contribution_recur_get_expectedresult(){
           'frequency_unit' => 'day',
           'frequency_interval' => '1',
           'installments' => '12',
-          'start_date' => '2012-01-01 00:00:00',
+          'start_date' => '2013-07-29 00:00:00',
           'create_date' => '20120130621222105',
           'contribution_status_id' => '1',
           'is_test' => 0,
index 7aa448a1d6ea5f452a741dfcdfe169863c7d28ed..235eb182e46cdc1dc91844f52347da70c95abc02 100644 (file)
@@ -48,8 +48,8 @@ function custom_group_create_expectedresult(){
           'name' => 'test_group_1',
           'title' => 'Test_Group_1',
           'extends' => 'Individual',
-          'extends_entity_column_id' => 'null',
-          'extends_entity_column_value' => 'null',
+          'extends_entity_column_id' => '',
+          'extends_entity_column_value' => '',
           'style' => 'Inline',
           'collapse_display' => '1',
           'help_pre' => 'This is Pre Help For Test Group 1',
@@ -59,10 +59,10 @@ function custom_group_create_expectedresult(){
           'table_name' => 'civicrm_value_test_group_1_1',
           'is_multiple' => '',
           'min_multiple' => '',
-          'max_multiple' => 'null',
+          'max_multiple' => '',
           'collapse_adv_display' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 08:49:19',
+          'created_date' => '',
           'is_reserved' => '',
         ),
     ),
index 0e11d25e25d53ac3a9c9fd7ed598ced5f20dbb56..8f6a1b116c869decd2209c70a4ee26c6c767f81b 100644 (file)
@@ -102,10 +102,7 @@ function email_replace_expectedresult(){
           'geo_code_1' => '',
           'geo_code_2' => '',
           'state_province_id' => '',
-          'state_province_name' => '',
-          'state_province' => '',
           'country_id' => '',
-          'country' => '',
           'phone_id' => '',
           'phone_type_id' => '',
           'phone' => '',
@@ -117,6 +114,9 @@ function email_replace_expectedresult(){
           'im' => '',
           'worldregion_id' => '',
           'world_region' => '',
+          'state_province_name' => '',
+          'state_province' => '',
+          'country' => '',
           'id' => '10',
           'api.email.replace' => array(
               'is_error' => 0,
index 37de47de34ea667dd5aae1d6946b93102d1cf53d..7c49f621bb13d71eb70b8ec38454424d5a99be79 100644 (file)
@@ -50,7 +50,7 @@ function event_getsingle_expectedresult(){
   'is_multiple_registrations' => 0,
   'allow_same_participant_emails' => 0,
   'is_template' => 0,
-  'created_date' => '2013-07-28 19:57:44',
+  'created_date' => '2013-08-03 21:23:22',
   'is_share' => '1',
   'available_places' => 0,
   'is_full' => '1',
index 5ac4c699c8cebd7a79048ec0dcf5d1cde9181f14..3b55e4d79bad212ad769c6a1a8c5cde4a5453e3e 100644 (file)
@@ -55,8 +55,8 @@ function event_create_expectedresult(){
           'event_type_id' => '1',
           'participant_listing_id' => '',
           'is_public' => '1',
-          'start_date' => '20081021000000',
-          'end_date' => '20081023000000',
+          'start_date' => '2013-07-29 00:00:00',
+          'end_date' => '2013-08-04 00:00:00',
           'is_online_registration' => '1',
           'registration_link_text' => '',
           'registration_start_date' => '20080601000000',
index f57b517172283608c94df57f0225052d43fe1059..400d3dcaa51bbf716f331d1e6f0389f3d03a309a 100644 (file)
@@ -41,8 +41,8 @@ function event_get_expectedresult(){
           'event_type_id' => '1',
           'participant_listing_id' => 0,
           'is_public' => '1',
-          'start_date' => '2008-10-21 00:00:00',
-          'event_start_date' => '2008-10-21 00:00:00',
+          'start_date' => '2013-07-29 00:00:00',
+          'event_start_date' => '2013-07-29 00:00:00',
           'is_online_registration' => 0,
           'is_monetary' => 0,
           'is_map' => 0,
index 37d928094e712add28d2b3c4364c6913b6c947d5..97a42badf5ed51a826340d3a75ea4b0f999611bc 100644 (file)
@@ -44,7 +44,7 @@ function grant_create_expectedresult(){
           'id' => '1',
           'contact_id' => '3',
           'application_received_date' => '20130728084957',
-          'decision_date' => '20130729000000',
+          'decision_date' => '20130805000000',
           'money_transfer_date' => '',
           'grant_due_date' => '',
           'grant_report_received' => '',
index af7907488267b784f1df7a9de0f916e8950fd638..0b340841e047cf827bf770fe29505f91b79cdacb 100644 (file)
@@ -37,7 +37,7 @@ function grant_get_expectedresult(){
           'id' => '2',
           'contact_id' => '4',
           'application_received_date' => '20130728084957',
-          'decision_date' => '2013-07-29',
+          'decision_date' => '2013-08-05',
           'grant_type_id' => '1',
           'amount_total' => '500.00',
           'currency' => 'USD',
index f41d8fb6f743902354f6d12752f57d48402105a6..4832c484bc1441ece4ef14803c30db6a6b5d9b6a 100644 (file)
@@ -55,7 +55,7 @@ function group_contact_get_expectedresult(){
                       'is_active' => '1',
                       'visibility' => 'Public Pages',
                       'where_clause' => ' ( `civicrm_group_contact-1`.group_id IN ( 1 ) AND `civicrm_group_contact-1`.status IN ("Added") ) ',
-                      'select_tables' => 'a:9:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}',
+                      'select_tables' => 'a:8:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}',
                       'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}',
                       'group_type' => array(
                           '0' => '1',
@@ -93,7 +93,7 @@ function group_contact_get_expectedresult(){
                       'is_active' => '1',
                       'visibility' => 'Public Pages',
                       'where_clause' => ' ( `civicrm_group_contact-1`.group_id IN ( 1 ) AND `civicrm_group_contact-1`.status IN ("Added") ) ',
-                      'select_tables' => 'a:9:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}',
+                      'select_tables' => 'a:8:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}',
                       'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-1`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-1` ON contact_a.id = `civicrm_group_contact-1`.contact_id ";}',
                       'group_type' => array(
                           '0' => '1',
index ce5e3093d1e19bd1004ae84895e543c2dceea27a..814907546a28f485fe6a2f86301a09540d4b0af8 100644 (file)
@@ -43,7 +43,7 @@ function group_get_expectedresult(){
           'is_active' => '1',
           'visibility' => 'Public Pages',
           'where_clause' => ' ( `civicrm_group_contact-4`.group_id IN ( 4 ) AND `civicrm_group_contact-4`.status IN ("Added") ) ',
-          'select_tables' => 'a:9:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-4`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON contact_a.id = `civicrm_group_contact-4`.contact_id ";}',
+          'select_tables' => 'a:8:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-4`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON contact_a.id = `civicrm_group_contact-4`.contact_id ";}',
           'where_tables' => 'a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-4`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-4` ON contact_a.id = `civicrm_group_contact-4`.contact_id ";}',
           'group_type' => array(
               '0' => '1',
index c205135a92d1ffdc9654ed6144ab30a73e9a2b67..7d28bce873eb63ccfa0b5ffb612eae0b8b7a9391 100644 (file)
@@ -59,7 +59,7 @@ function loc_block_createentities_expectedresult(){
             ),
           'email' => array(
               'id' => '4',
-              'contact_id' => 'null',
+              'contact_id' => '',
               'location_type_id' => '1',
               'email' => 'test2@loc.block',
               'is_primary' => 0,
@@ -73,7 +73,7 @@ function loc_block_createentities_expectedresult(){
             ),
           'phone' => array(
               'id' => '3',
-              'contact_id' => 'null',
+              'contact_id' => '',
               'location_type_id' => '1',
               'is_primary' => 0,
               'is_billing' => '',
@@ -85,7 +85,7 @@ function loc_block_createentities_expectedresult(){
             ),
           'phone_2' => array(
               'id' => '4',
-              'contact_id' => 'null',
+              'contact_id' => '',
               'location_type_id' => '1',
               'is_primary' => 0,
               'is_billing' => '',
index 90e2b993bbdf65d18ae4c87905ca0874cb31078b..77f76a7f46b0b200b0ba712009bd7eadc730d285 100644 (file)
@@ -39,8 +39,8 @@ function mailing_create_expectedresult(){
       '1' => array(
           'id' => '1',
           'domain_id' => '1',
-          'header_id' => 'null',
-          'footer_id' => 'null',
+          'header_id' => '',
+          'footer_id' => '',
           'reply_id' => '',
           'unsubscribe_id' => '',
           'resubscribe_id' => '',
index 23c4e8c9df0929b3a16dc2d440a40a26d1631fdd..ef287f111ddda481e3e895face0f18129c30d1c6 100644 (file)
@@ -34,12 +34,14 @@ function mailing_group_subscribe_expectedresult(){
   $expectedResult = array(
   'is_error' => 0,
   'version' => 3,
-  'count' => 4,
+  'count' => 1,
+  'id' => 1,
   'values' => array(
-      'contact_id' => '3',
-      'subscribe_id' => '1',
-      'hash' => 'bf4d724dbbb38c0c',
-      'is_error' => 0,
+      '1' => array(
+          'contact_id' => '3',
+          'subscribe_id' => '1',
+          'hash' => '67eac7789eaee00',
+        ),
     ),
 );
 
index 2bf364e3ab437a151d72b4a2e94a27f57536f49e..676626ff3ed261911f930f017f1965495407e562 100644 (file)
@@ -43,9 +43,9 @@ function membership_get_expectedresult(){
           'membership_contact_id' => '13',
           'membership_type_id' => '11',
           'join_date' => '2009-01-21',
-          'start_date' => '2009-01-21',
+          'start_date' => '2013-07-29 00:00:00',
           'membership_start_date' => '2009-01-21',
-          'end_date' => '2009-12-21',
+          'end_date' => '2013-08-04 00:00:00',
           'membership_end_date' => '2009-12-21',
           'source' => 'Payment',
           'membership_source' => 'Payment',
index 47ec1be3ba64a67c3310070b6c046effff4c4264..c401be31b10ca4a3c6194e5ccf3b8a62ca839931 100644 (file)
@@ -46,8 +46,8 @@ function membership_create_expectedresult(){
           'contact_id' => '25',
           'membership_type_id' => '22',
           'join_date' => '20090121000000',
-          'start_date' => '20090121000000',
-          'end_date' => '20091221000000',
+          'start_date' => '2013-07-29 00:00:00',
+          'end_date' => '2013-08-04 00:00:00',
           'source' => 'Payment',
           'status_id' => '28',
           'is_override' => '1',
index fe5bcf09042a7b5dd25d575d208d10cf4f293255..7d36c8a8ee25b85ab6028ccd18f46af14dbdc873 100644 (file)
@@ -38,8 +38,8 @@ function membership_get_expectedresult(){
           'contact_id' => '10',
           'membership_type_id' => '8',
           'join_date' => '2009-01-21',
-          'start_date' => '2009-01-21',
-          'end_date' => '2009-12-21',
+          'start_date' => '2013-07-29 00:00:00',
+          'end_date' => '2013-08-04 00:00:00',
           'source' => 'Payment',
           'status_id' => '15',
           'is_override' => '1',
index 53ecc5e6525162f17d59fb1f9e2634a3a0d22514..02df23632bef8831020e9a406a6d95f1936cc28c 100644 (file)
@@ -46,8 +46,8 @@ function membership_update_expectedresult(){
           'contact_id' => '31',
           'membership_type_id' => '28',
           'join_date' => '20090121000000',
-          'start_date' => '20090121000000',
-          'end_date' => '20091221000000',
+          'start_date' => '2013-07-29 00:00:00',
+          'end_date' => '2013-08-04 00:00:00',
           'source' => 'Payment',
           'status_id' => '34',
           'is_override' => '1',
index fa103849e871ff593f97d8c79c73ece097ed4528..1242fe3a83ec806f266a1298fe6a49c93e1b29c6 100644 (file)
@@ -75,6 +75,8 @@ function participant_create_expectedresult(){
           'first_name' => '',
           'middle_name' => '',
           'last_name' => '',
+          'prefix_id' => '',
+          'suffix_id' => '',
           'email_greeting_id' => '1',
           'email_greeting_custom' => '',
           'email_greeting_display' => '',
index a2a9bc18f376aea5034d61e593910ba822210024..29e716316199148a9737293d10e54a9163aeb078 100644 (file)
@@ -41,8 +41,8 @@ function participant_get_expectedresult(){
           'display_name' => 'Mr. Anthony Anderson II',
           'event_id' => '38',
           'event_title' => 'Annual CiviCRM meet',
-          'event_start_date' => '2008-10-21 00:00:00',
-          'event_end_date' => '2008-10-23 00:00:00',
+          'event_start_date' => '2013-07-29 00:00:00',
+          'event_end_date' => '2013-08-04 00:00:00',
           'participant_id' => '2',
           'participant_fee_level' => '',
           'participant_fee_amount' => '',
@@ -75,8 +75,8 @@ function participant_get_expectedresult(){
           'display_name' => 'Mr. Anthony Anderson II',
           'event_id' => '38',
           'event_title' => 'Annual CiviCRM meet',
-          'event_start_date' => '2008-10-21 00:00:00',
-          'event_end_date' => '2008-10-23 00:00:00',
+          'event_start_date' => '2013-07-29 00:00:00',
+          'event_end_date' => '2013-08-04 00:00:00',
           'participant_id' => '3',
           'participant_fee_level' => '',
           'participant_fee_amount' => '',
index 2566c1bc4b23bf43c280f41212639bbeafeef5c2..31eaf2fa9c2e72c567512bd77a4c8e3f40b9aef4 100644 (file)
@@ -42,8 +42,8 @@ function participant_get_expectedresult(){
           'display_name' => 'Mr. Anthony Anderson II',
           'event_id' => '6',
           'event_title' => 'Annual CiviCRM meet',
-          'event_start_date' => '2008-10-21 00:00:00',
-          'event_end_date' => '2008-10-23 00:00:00',
+          'event_start_date' => '2013-07-29 00:00:00',
+          'event_end_date' => '2013-08-04 00:00:00',
           'participant_id' => '1',
           'participant_fee_level' => '',
           'participant_fee_amount' => '',
@@ -77,10 +77,10 @@ function participant_get_expectedresult(){
                       'event_type_id' => '1',
                       'participant_listing_id' => 0,
                       'is_public' => '1',
-                      'start_date' => '2008-10-21 00:00:00',
-                      'event_start_date' => '2008-10-21 00:00:00',
-                      'end_date' => '2008-10-23 00:00:00',
-                      'event_end_date' => '2008-10-23 00:00:00',
+                      'start_date' => '2013-07-29 00:00:00',
+                      'event_start_date' => '2013-07-29 00:00:00',
+                      'end_date' => '2013-08-04 00:00:00',
+                      'event_end_date' => '2013-08-04 00:00:00',
                       'is_online_registration' => '1',
                       'registration_start_date' => '2008-06-01 00:00:00',
                       'registration_end_date' => '2008-10-15 00:00:00',
index 9e4e31a827de7041308f7e25260c32d5527b900b..f2f775231727141d21838aac530a093682fa94a8 100644 (file)
@@ -41,8 +41,8 @@ function participant_get_expectedresult(){
           'display_name' => 'Mr. Anthony Anderson II',
           'event_id' => '5',
           'event_title' => 'Annual CiviCRM meet',
-          'event_start_date' => '2008-10-21 00:00:00',
-          'event_end_date' => '2008-10-23 00:00:00',
+          'event_start_date' => '2013-07-29 00:00:00',
+          'event_end_date' => '2013-08-04 00:00:00',
           'participant_id' => '1',
           'participant_fee_level' => '',
           'participant_fee_amount' => '',
index 44eb58d308589142c4fdbc24d54a724cec3acb20..8534a0a14911191dea98476666eb686ea744f751 100644 (file)
@@ -5,7 +5,7 @@
  */
 function pledge_get_example(){
 $params = array(
-  'pledge_start_date_high' => '20130726201306',
+  'pledge_start_date_high' => '20130801213843',
 );
 
 try{
@@ -41,7 +41,7 @@ function pledge_get_expectedresult(){
           'display_name' => 'Mr. Anthony Anderson II',
           'pledge_id' => '2',
           'pledge_amount' => '100.00',
-          'pledge_create_date' => '2013-07-28 00:00:00',
+          'pledge_create_date' => '2013-08-03 00:00:00',
           'pledge_status' => 'Overdue',
           'pledge_total_paid' => '',
           'pledge_next_pay_date' => '2012-03-02 00:00:00',
index 70b6ad53173bcc60df9e1575b2880c0a734a3f4f..fece5a44d6e100c6f7a184d4495c1a5791635f27 100644 (file)
@@ -6,9 +6,9 @@
 function pledge_create_example(){
 $params = array(
   'contact_id' => 11,
-  'pledge_create_date' => '20130728',
-  'start_date' => '20130728',
-  'scheduled_date' => '20130730',
+  'pledge_create_date' => '20130803',
+  'start_date' => '20130803',
+  'scheduled_date' => '20130805',
   'amount' => '100',
   'pledge_status_id' => '2',
   'pledge_financial_type_id' => '1',
@@ -57,10 +57,10 @@ function pledge_create_expectedresult(){
           'frequency_interval' => '5',
           'frequency_day' => '15',
           'installments' => '5',
-          'start_date' => '20130728000000',
+          'start_date' => '2013-07-29 00:00:00',
           'create_date' => '20120130621222105',
           'acknowledge_date' => '',
-          'modified_date' => '2012-11-14 16:02:35',
+          'modified_date' => '',
           'cancel_date' => '',
           'end_date' => '',
           'honor_contact_id' => '',
index c50cb5bba8329730a463426d13652392eb3eee58..8fa605ca09cbada1230cf2449e0824c46d90d90b 100644 (file)
@@ -41,10 +41,10 @@ function pledge_get_expectedresult(){
           'display_name' => 'Mr. Anthony Anderson II',
           'pledge_id' => '1',
           'pledge_amount' => '100.00',
-          'pledge_create_date' => '2013-07-28 00:00:00',
+          'pledge_create_date' => '2013-08-03 00:00:00',
           'pledge_status' => 'Pending',
           'pledge_total_paid' => '',
-          'pledge_next_pay_date' => '2013-07-30 00:00:00',
+          'pledge_next_pay_date' => '2013-08-05 00:00:00',
           'pledge_next_pay_amount' => '20.00',
           'pledge_outstanding_amount' => '',
           'pledge_financial_type' => 'Donation',
index 1e91350edf2b6c56525df58ab869d6647414eb7a..d7b10206c85f44ccdbec0c22b3b55c9ff647fec6 100644 (file)
@@ -44,7 +44,7 @@ function pledge_payment_create_expectedresult(){
           'scheduled_amount' => '',
           'actual_amount' => '20',
           'currency' => 'USD',
-          'scheduled_date' => '20130728085413',
+          'scheduled_date' => '',
           'reminder_date' => '',
           'reminder_count' => '',
           'status_id' => '1',
index df358ea6e102730605148c6647e43038d0ebcd6d..835ae7079a6f3544fc97020709251b92882aa3fb 100644 (file)
@@ -65,6 +65,8 @@ function profile_set_expectedresult(){
           'first_name' => 'abc2',
           'middle_name' => '',
           'last_name' => 'xyz2',
+          'prefix_id' => '',
+          'suffix_id' => '',
           'email_greeting_id' => '1',
           'email_greeting_custom' => '',
           'email_greeting_display' => 'Dear abc1',
@@ -73,7 +75,7 @@ function profile_set_expectedresult(){
           'postal_greeting_display' => 'Dear abc1',
           'addressee_id' => '1',
           'addressee_custom' => '',
-          'addressee_display' => '{contact.individual_prefix} abc1 {contact.middle_name} xyz1 {contact.individual_suffix}',
+          'addressee_display' => '{contact.individual_prefix} abc1 xyz1 {contact.individual_suffix}',
           'job_title' => '',
           'gender_id' => '',
           'birth_date' => '',
index e3191c4aee1e4e057aa3d2277b59fd6e9b603706..152a9ca8b88fb2acc7e8ccd79a575f9f7d0e593a 100644 (file)
@@ -42,7 +42,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '32',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
@@ -53,7 +53,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '33',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
@@ -64,7 +64,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '34',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index 8d03eb93d50c7492c3aa21bdae7d858112437ef2..b1b8d7c5882c81ab96d059485d068536abc62e8a 100644 (file)
@@ -42,7 +42,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '32',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
@@ -53,7 +53,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '33',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index 03a843963c452fdd62ba3e75ad086494a675a0f4..40037d60d6c972eb0bc7fd5071b209b7c9525791 100644 (file)
@@ -43,7 +43,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '31',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index fa3bc4ee0bbfab4065662d3d88d2fdbfdb6ff5a6..299a8b7e794018257003339f86e5311787580100 100644 (file)
@@ -42,7 +42,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '31',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
@@ -53,7 +53,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '63',
           'contact_id_b' => '64',
           'relationship_type_id' => '34',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index 14eae6c90bc937a119d5ebad46a3a2b6835d3ca6..0116fd8697b12c7153fa41f9b06928d8158f374b 100644 (file)
@@ -40,7 +40,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '60',
           'contact_id_b' => '61',
           'relationship_type_id' => '30',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index 56ec1672f37ae03dc200c96ae3579ec5a6c00800..8708deaa327ef8a78b8aa4288dcb52a7a88129fa 100644 (file)
@@ -44,8 +44,8 @@ function relationship_create_expectedresult(){
           'contact_id_a' => '24',
           'contact_id_b' => '25',
           'relationship_type_id' => '18',
-          'start_date' => '20101030000000',
-          'end_date' => '20101230000000',
+          'start_date' => '2013-07-29 00:00:00',
+          'end_date' => '2013-08-04 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index 70c830844b8809136fba1915b7c3d464f812bf38..7e2fb5a40f83f9799aed3ffad1b40eecb5e5a4b3 100644 (file)
@@ -38,7 +38,7 @@ function relationship_get_expectedresult(){
           'contact_id_a' => '33',
           'contact_id_b' => '34',
           'relationship_type_id' => '21',
-          'start_date' => '2008-12-20',
+          'start_date' => '2013-07-29 00:00:00',
           'is_active' => '1',
           'description' => '',
           'is_permission_a_b' => 0,
index 496e5d795af9c1b405ae4187bef4fd77fd0a4d26..e94ceb5fb8fc41281d0342048932fb60a6796501 100644 (file)
@@ -56,6 +56,7 @@ function survey_create_expectedresult(){
           'bypass_confirm' => '',
           'thankyou_title' => '',
           'thankyou_text' => '',
+          'is_share' => '',
         ),
     ),
 );
index be58d0e7a2c071b3c72912a4475eb6ce4313b65a..dac7b87d8dac842b0ba3794a0523866a842bdaf3 100644 (file)
@@ -44,7 +44,7 @@ function tag_create_expectedresult(){
           'is_tagset' => '',
           'used_for' => 'civicrm_contact',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
         ),
     ),
 );
index 76d9f9167b8f89228f5af6b14ee812faff040117..d828cfacdbf4590cb36b19948f337079d57a7da4 100644 (file)
@@ -42,7 +42,7 @@ function tag_get_expectedresult(){
           'is_reserved' => 0,
           'is_tagset' => 0,
           'used_for' => 'civicrm_contact',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
         ),
     ),
 );
index 4c31a0e387b067c25b53a6e8d3ee4d91f3d3319d..0aef06e7db7c2a63f0a94f15cf4ed219a1022aa1 100644 (file)
@@ -78,7 +78,7 @@ function uf_field_replace_expectedresult(){
           'visibility' => 'Public Pages and Listings',
           'in_selector' => '',
           'is_searchable' => '1',
-          'location_type_id' => 'null',
+          'location_type_id' => '',
           'phone_type_id' => '',
           'label' => 'Test First Name',
           'field_type' => 'Contact',
index da390e82214f410a0ff8304e0cb17b81b03d76ab..13753b787d37bbeff45348e6943486b7ab8f4e44 100644 (file)
@@ -57,6 +57,7 @@ function uf_group_create_expectedresult(){
           'is_active' => 0,
           'group_type' => 'Individual,Contact',
           'title' => 'Test Group',
+          'description' => '',
           'help_pre' => 'help pre',
           'help_post' => 'help post',
           'limit_listings_group_id' => '1',
@@ -73,7 +74,7 @@ function uf_group_create_expectedresult(){
           'is_reserved' => '1',
           'name' => 'Test_Group_2',
           'created_id' => '1',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'is_proximity_search' => '',
         ),
     ),
index 81e2a6c9dbb016520f68cb60198262847a45f82d..b3fd004252f9c3efd6f1ab57039fde5f6c43729b 100644 (file)
@@ -54,7 +54,7 @@ function uf_group_get_expectedresult(){
           'is_reserved' => '1',
           'name' => 'Test_Group_2',
           'created_id' => '1',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'is_proximity_search' => 0,
         ),
     ),
index 0a2ef235d0ca5863cbcea3ea0f79b97c86fee8d1..e2d4b8efbb5a8b2d7d5aee403da55b69e724cdd4 100644 (file)
@@ -1929,6 +1929,11 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
       'scheduled_date' => '20130728085413',
       'approval_date' => '20130728085413',
       'pledge_start_date_high' => '20130726090416',
+      'start_date' => '2013-07-29 00:00:00',
+      'event_start_date' => '2013-07-29 00:00:00',
+      'end_date' => '2013-08-04 00:00:00',
+      'event_end_date' => '2013-08-04 00:00:00',
+      'decision_date' => '20130805000000',
     );
 
     $keysToUnset = array('xdebug', 'undefined_fields',);
@@ -1937,9 +1942,20 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
         unset($result[$unwantedKey]);
       }
     }
+    if (isset($result['values'])) {
+      if(!is_array($result['values'])) {
+        return;
+      }
+      $resultArray = &$result['values'];
+    }
+    elseif(is_array($result)) {
+      $resultArray = &$result;
+    }
+    else {
+      return;
+    }
 
-    if (isset($result['values']) && is_array($result['values'])) {
-      foreach ($result['values'] as $index => &$values) {
+    foreach ($resultArray as $index => &$values) {
         if(!is_array($values)) {
           continue;
         }
@@ -1959,11 +1975,10 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
           if(in_array($key, $keysToUnset)) {
             unset($values[$key]);
           }
-          if(array_key_exists($key, $fieldsToChange)) {
+          if(array_key_exists($key, $fieldsToChange) && !empty($value)) {
             $value = $fieldsToChange[$key];
           }
         }
-      }
     }
   }
 
index 1dff0275baa19c48d18a95c7b2b0b7795f636667..4f6485a85e30a146eba060f64439ea8cdfd82e97 100644 (file)
@@ -48,6 +48,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
   protected $_apiversion = 3;
   protected $test_activity_type_value;
   protected $_contactID;
+
   public $_eNoticeCompliant = TRUE;
   /**
    *  Test setup for every test
@@ -107,15 +108,14 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'civicrm_activity_contact',
     );
     $this->quickCleanup($tablesToTruncate, TRUE);
-    $this->callAPISuccess('option_value', 'delete', array('version' => 3, 'id' => $this->test_activity_type_id));
+    $this->callAPISuccess('option_value', 'delete', array('id' => $this->test_activity_type_id));
   }
 
   /**
    * check with empty array
    */
   function testActivityCreateEmpty() {
-    $params = array('version' => $this->_apiversion);
-    $result = $this->callAPIFailure('activity', 'create', $params);
+    $result = $this->callAPIFailure('activity', 'create', array());
   }
 
   /**
@@ -125,9 +125,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $params = array(
       'subject' => 'this case should fail',
       'scheduled_date_time' => date('Ymd'),
-      'version' => $this->_apiversion,
     );
-
     $result = $this->callAPIFailure('activity', 'create', $params);
   }
 
@@ -147,7 +145,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'activity_name' => 'Fubar activity type',
       'activity_type_id' => 5,
       'scheduled_date_time' => date('Ymd'),
-      'version' => $this->_apiversion,
     );
 
     $result = $this->callAPIFailure('activity', 'create', $params);
@@ -188,7 +185,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $result = $this->callAPIFailure('activity', 'create', $params);
   }
 
-
   /**
    * Ensure that an invalid activity type causes failure
    * oddly enough this test was failing because the creation of the invalid type
@@ -204,7 +200,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'details' => 'a test activity',
       'status_id' => 1,
       'activity_type_id' => 'Invalid Test activity type',
-      'version' => $this->_apiversion,
     );
 
     $result = $this->callAPIFailure('activity', 'create', $params);
@@ -302,10 +297,9 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
    *  Test civicrm_activity_create() with valid parameters - use type_id
    */
   function testActivityCreateCampaignTypeID() {
+    CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
     // force reload of config object
     $config = CRM_Core_Config::singleton(TRUE, TRUE);
-
-    CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
     //flush cache by calling with reset
     $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name', TRUE);
 
@@ -354,10 +348,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'assignee_contact_id' => $this->_contactID,
     );
 
-    $result = $this->callAPISuccess('activity', 'create', $params);
-    //todo test target & assignee are set
-
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, $description, $subfile);
+    $result = $this->callAPIAndDocument('activity', 'create', $params, __FUNCTION__, __FILE__, $description, $subfile);
     $result = $this->callAPISuccess('activity', 'get', array('id' => $result['id'], 'version' => $this->_apiversion, 'return.assignee_contact_id' => 1, 'return.target_contact_id' => 1));
 
     $this->assertEquals($this->_contactID, $result['values'][$result['id']]['assignee_contact_id'][0], 'in line ' . __LINE__);
@@ -382,8 +373,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
     $params = $this->_params;
     $params['custom_' . $ids['custom_field_id']] = "custom string";
-    $result = $this->callAPISuccess($this->_entity, 'create', $params);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__);
+    $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__);
     $result = $this->callAPISuccess($this->_entity, 'get', array('return.custom_' . $ids['custom_field_id'] => 1, 'version' => 3, 'id' => $result['id']));
     $this->assertEquals("custom string", $result['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
 
@@ -416,10 +406,8 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $params = $this->_params;
     $params['custom_' . $customField['id']] = "$this->_contactID";
 
-    $result = $this->callAPISuccess($this->_entity, 'create', $params);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, $description, $subfile);
-    $result = $this->callAPISuccess($this->_entity, 'get', array('return.custom_' . $customField['id'] => 1, 'version' => 3, 'id' => $result['id']));
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, 'Get with Contact Ref Custom Field', 'ContactRefCustomFieldGet');
+    $result = $this->callAPIAndDocument($this->_entity, 'create', $params, __FUNCTION__, __FILE__, $description, $subfile, 'Create');
+    $result = $this->callAPIAndDocument($this->_entity, 'get', array('return.custom_' . $customField['id'] => 1, 'id' => $result['id']), __FUNCTION__, __FILE__, 'Get with Contact Ref Custom Field', 'ContactRefCustomFieldGet', 'get');
 
     $this->assertEquals('Anderson, Anthony', $result['values'][$result['id']]['custom_' . $customField['id']], ' in line ' . __LINE__);
     $this->assertEquals($this->_contactID, $result['values'][$result['id']]['custom_' . $customField['id'] . "_id"], ' in line ' . __LINE__);
@@ -532,10 +520,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       ),
     );
 
-    $result = $this->callAPISuccess('Activity', 'Get', $params);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, $description, $subfile);
-
-    $this->assertAPISuccess($result);
+    $result = $this->callAPIAndDocument('Activity', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
 
     $this->assertEquals($activity['id'], $result['id'], 'In line ' . __LINE__);
 
@@ -559,14 +544,13 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'details' => 'a test activity',
       'status_id' => 1,
       'activity_name' => 'Test activity type',
-      'version' => $this->_apiversion,
       'priority_id' => 1,
     );
-    $this->callAPISuccess('Activity', 'Create', $params);
-    $result = $this->callAPISuccess('Activity', 'Get', array('version' => 3, 'subject' => 'Make-it-Happen Meeting'));
+    $result = $this->callAPISuccess('Activity', 'Create', $params);
+    $this->callAPISuccess('Activity', 'Get', array('subject' => 'Make-it-Happen Meeting'));
     $this->assertEquals(1, $result['count']);
     $this->assertEquals('Make-it-Happen Meeting', $result['values'][$result['id']]['subject']);
-    $this->callAPISuccess('Activity', 'Delete', array('version' => 3, 'id' => $result['id']));
+    $this->callAPISuccess('Activity', 'Delete', array('id' => $result['id']));
   }
   /*
    * test that get functioning does filtering
@@ -637,8 +621,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'filter.activity_date_time_low' => '20120101000000',
       'sequential' => 1,
     );
-    $result = $this->callAPISuccess('Activity', 'Get', $params);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, $description, $subfile);
+    $result = $this->callAPIAndDocument('Activity', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
     $this->assertEquals(1, $result['count'], 'in line ' . __LINE__);
     $description = "demonstrates _high filter (at time of writing doesn't work if contact_id is set";
     $subfile = "DateTimeHigh";
@@ -649,8 +632,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'filter.activity_date_time_high' => '20120101000000',
       'sequential' => 1,
     );
-    $result = $this->callAPISuccess('Activity', 'Get', $params);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, $description, $subfile);
+    $result = $this->callAPIAndDocument('Activity', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
 
     $this->assertEquals(1, $result['count']);
     $this->assertEquals('2011-01-01 00:00:00', $result['values'][0]['activity_date_time'], 'in line ' . __LINE__);
@@ -670,21 +652,17 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $params['custom_' . $ids['custom_field_id']] = "custom string";
 
     $result = $this->callAPISuccess($this->_entity, 'create', $params);
-    $this->assertAPISuccess($result, ' in line ' . __LINE__);
+
     //  Retrieve the test value
     $params = array(
       'activity_type_id' => $this->test_activity_type_value,
-      'version' => 3,
       'sequential' => 1,
       'return.custom_' . $ids['custom_field_id'] => 1,
     );
-    $result = $this->callAPISuccess('activity', 'get', $params, TRUE);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__);
-    $this->assertAPISuccess($result, ' in line ' . __LINE__);
-    $this->assertEquals("custom string", $result['values'][0]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
+    $result = $this->callAPIAndDocument('activity', 'get', $params, __FUNCTION__, __FILE__);
+    $this->assertEquals("custom string", $result['values'][0]['custom_' . $ids['custom_field_id']]);
 
-
-    $this->assertEquals($this->test_activity_type_value, $result['values'][0]['activity_type_id'], 'In line ' . __LINE__);
+    $this->assertEquals($this->test_activity_type_value, $result['values'][0]['activity_type_id']);
     $this->assertEquals('test activity type id', $result['values'][0]['subject'], 'In line ' . __LINE__);
     $this->customFieldDelete($ids['custom_field_id']);
     $this->customGroupDelete($ids['custom_group_id']);
@@ -705,14 +683,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $params = array(
       'contact_id' => $this->_params['source_contact_id'],
       'activity_type_id' => $this->test_activity_type_value,
-      'version' => 3,
       'sequential' => 1,
       'return.custom_' . $ids['custom_field_id'] => 1,
     );
-    $result = $this->callAPISuccess('activity', 'get', $params, TRUE);
-    $this->assertAPISuccess($result, 'in line ' . __LINE__);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__);
-    $this->assertAPISuccess($result);
+    $result = $this->callAPIAndDocument('activity', 'get', $params, __FUNCTION__, __FILE__);
     $this->assertEquals("custom string", $result['values'][0]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
 
     $this->assertEquals($this->test_activity_type_value, $result['values'][0]['activity_type_id'], 'In line ' . __LINE__);
@@ -771,7 +745,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
 
     $result = $this->callAPISuccess('activity', 'delete', $params);
     $this->documentMe($params, $result, __FUNCTION__, __FILE__);
-    $this->assertAPISuccess($result);
   }
 
   /**
@@ -832,11 +805,9 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'status_id' => 1,
       'source_contact_id' => $this->_contactID,
       'priority_id' => 1,
-      'version' => $this->_apiversion,
     );
 
     $result = $this->callAPISuccess('activity', 'create', $params);
-    $this->assertAPISuccess($result, 'in line ' . __LINE__);
     //hack on date comparison - really we should make getAndCheck smarter to handle dates
     $params['activity_date_time'] = '2009-10-11 12:34:56';
     // we also unset source_contact_id since it is stored in an aux table
@@ -870,7 +841,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('activity', 'create', $params);
 
     $activityId = $result['id'];
-    $this->assertAPISuccess($result);
     $result = $this->callAPISuccess($this->_entity, 'get', array('return.custom_' . $ids['custom_field_id'] => 1, 'version' => 3, 'id' => $result['id']));
     $this->assertEquals("custom string", $result['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
     $this->assertEquals("2009-10-18 00:00:00", $result['values'][$result['id']]['activity_date_time'], ' in line ' . __LINE__);
@@ -890,7 +860,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'version' => $this->_apiversion,
     );
     $result = $this->callAPISuccess('Activity', 'Create', $params);
-    $this->assertAPISuccess($result);
 
     $result = $this->callAPISuccess($this->_entity, 'get', array('return.custom_' . $ids['custom_field_id'] => 1, 'version' => 3, 'id' => $result['id']));
     $this->assertEquals("Updated my test data", $result['values'][$result['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
@@ -930,7 +899,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('Activity', 'Create', $params);
 
     $activityId = $result['id'];
-    $this->assertAPISuccess($result);
     $getParams = array(
       'return.assignee_contact_id' => 1,
       'return.target_contact_id' => 1,
@@ -970,12 +938,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
 
     $params = array();
     $params['id'] = $activityId;
-    $params['version'] = $this->_apiversion;
     $params['assignee_contact_id'] = array($contact3 => $contact3);
     $params['target_contact_id'] = array($contact4 => $contact4);
 
     $result = $this->callAPISuccess('activity', 'create', $params);
-    $this->assertAPISuccess($result);
 
     $this->assertEquals($activityId, $result['id'], ' in line ' . __LINE__);
 
@@ -986,7 +952,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
         'return.assignee_contact_id' => 1,
         'return.target_contact_id' => 1,
         'return.source_contact_id' => 1,
-        'version' => 3,
         'id' => $result['id']
       )
     );
@@ -1000,10 +965,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
     $this->assertEquals(TRUE, in_array($contact4, $target), ' in line ' . __LINE__);
 
     foreach ($this->_params as $fld => $val) {
-      if ($fld == 'version') {
-        continue;
-      }
-      $this->assertEquals($val, $result['values'][$result['id']][$fld], ' in line ' . __LINE__);
+      $this->assertEquals($val, $result['values'][$result['id']][$fld]);
     }
   }
 
@@ -1023,11 +985,9 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'status_id' => 1,
       'source_contact_id' => $this->_contactID,
       'priority_id' => 1,
-      'version' => $this->_apiversion,
     );
 
     $result = $this->callAPISuccess('activity', 'create', $params);
-    $this->assertAPISuccess($result, 'in line ' . __LINE__);
     //hack on date comparison - really we should make getAndCheck smarter to handle dates
     $params['activity_date_time'] = $this->_params['activity_date_time'];
     // we also unset source_contact_id since it is stored in an aux table
@@ -1040,27 +1000,18 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
    */
   function testActivityUpdateWithStatus() {
     $activity = $this->callAPISuccess('activity', 'create', $this->_params);
-    $this->assertAPISuccess($activity, "In line " . __LINE__);
     $params = array(
       'id' => $activity['id'],
       'source_contact_id' => $this->_contactID,
       'subject' => 'Hurry update works',
       'status_id' => 1,
       'activity_name' => 'Test activity type',
-      'version' => $this->_apiversion,
     );
 
     $result = $this->callAPISuccess('activity', 'create', $params);
-    $this->assertAPISuccess($result, "In line " . __LINE__);
-    $this->assertEquals($result['id'], $activity['id'], "In line " . __LINE__);
-    /*$this->assertEquals($result['values'][$activity['id']]['source_contact_id'], $this->_contactID,
-      "In line " . __LINE__
-      );*/
-    $this->assertEquals($result['values'][$activity['id']]['subject'], 'Hurry update works',
-      "In line " . __LINE__
-    );
-    $this->assertEquals($result['values'][$activity['id']]['status_id'], 1,
-      "In line " . __LINE__
+    $this->assertEquals($result['id'], $activity['id']);
+    $this->assertEquals($result['values'][$activity['id']]['subject'], 'Hurry update works');
+    $this->assertEquals($result['values'][$activity['id']]['status_id'], 1
     );
   }
 
@@ -1081,14 +1032,10 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
       'status_id' => 1,
       'activity_name' => 'Test activity type',
       'priority_id' => 1,
-      'version' => $this->_apiversion,
     );
 
     $result = $this->callAPISuccess('activity', 'create', $params);
-    $this->assertAPISuccess($result, 'in line ' . __LINE__);
-    $findactivity = $this->callAPISuccess('Activity', 'Get', array('id' => $activity['id'], 'version' => 3));
-
-    $this->assertAPISuccess($findactivity);
+    $findactivity = $this->callAPISuccess('Activity', 'Get', array('id' => $activity['id']));
   }
 
   /**
@@ -1127,7 +1074,6 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
                 ));
 
     $result = $this->callAPISuccess('Activity', 'Get', array(
-                'version' => 3,
                 'id' => $activity['id'],
                 'return.assignee_contact_id' => 1,
                 'api.contact.get' => array('api.pledge.get' => 1),
@@ -1163,8 +1109,7 @@ class api_v3_ActivityTest extends CiviUnitTestCase {
 
   function testGetFields() {
     $params = array('action' => 'create');
-    $result = $this->callAPISuccess('activity', 'getfields', $params);
-    $this->documentMe($params, $result, __FUNCTION__, __FILE__, NULL, NULL, 'getfields');
+    $result = $this->callAPIAndDocument('activity', 'getfields', $params, __FUNCTION__, __FILE__, NULL, NULL, 'getfields');
     $this->assertTrue(is_array($result['values']), 'get fields doesnt return values array in line ' . __LINE__);
     // $this->assertTrue(is_array($result['values']['priority_id']['options']));
     foreach ($result['values'] as $key => $value) {
index c97a56e82b639fe60061197e773a391fc4d819c2..4e72d23243785e4402e177d08cd9c1819eae552b 100644 (file)
@@ -196,8 +196,8 @@ class api_v3_EventTest extends CiviUnitTestCase {
     $description        = "demonstrates use of is.Current option";
     $subfile            = "IsCurrentOption";
     $result             = $this->callAPIAndDocument('Event', 'Get', $params, __FUNCTION__, __FILE__, $description, $subfile);
-    $allEvents = $this->callAPISuccess('Event', 'Get', array('version' => 3));
-    $this->callAPISuccess('Event', 'Delete', array('version' => 3, 'id' => $currentEvent['id']));
+    $allEvents = $this->callAPISuccess('Event', 'Get', array());
+    $this->callAPISuccess('Event', 'Delete', array('id' => $currentEvent['id']));
     $this->assertEquals(1, $result['count'], 'confirm only one event found in line ' . __LINE__);
     $this->assertEquals(3, $allEvents['count'], 'confirm three events exist (ie. two not found) ' . __LINE__);
     $this->assertEquals($currentEvent['id'], $result['id'], '');
index bd20a11c526feacc400659e0b6d604c335a806ae..6c84dece112f55bd8ed086620b07a9f977b424b5 100644 (file)
@@ -91,7 +91,8 @@ class api_v3_MailingGroupTest extends CiviUnitTestCase {
     $params = array(
       'email' => $this->_email,
       'group_id' => $this->_groupID,
-      'contact_id' => $contactID,      'hash' => 'b15de8b64e2cec34',
+      'contact_id' => $contactID,
+      'hash' => 'b15de8b64e2cec34',
       'time_stamp' => '20101212121212',
     );
     $result = $this->callAPIAndDocument('mailing_event_subscribe', 'create', $params, __FUNCTION__, __FILE__);