CRM-13072 tidy up of examples, syntax conformance debug
authoreileen <eileen@fuzion.co.nz>
Sun, 28 Jul 2013 19:44:17 +0000 (07:44 +1200)
committereileen <eileen@fuzion.co.nz>
Sun, 28 Jul 2013 20:30:48 +0000 (08:30 +1200)
33 files changed:
api/v3/examples/BatchCreate.php
api/v3/examples/BatchUpdate.php
api/v3/examples/CampaignCreate.php
api/v3/examples/CampaignGet.php
api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php
api/v3/examples/Contact/ChainTwoWebsites.php
api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php
api/v3/examples/ContactCreate.php
api/v3/examples/ContributionPageCreate.php
api/v3/examples/CustomGroupCreate.php
api/v3/examples/Event/IsCurrentOption.php
api/v3/examples/Event/IsFullOption.php
api/v3/examples/EventCreate.php
api/v3/examples/EventGet.php
api/v3/examples/GrantGet.php
api/v3/examples/MailingCreate.php
api/v3/examples/MailingGroupSubscribe.php
api/v3/examples/Participant/CreateParticipantPayment.php
api/v3/examples/Participant/NestedEventGet.php
api/v3/examples/Pledge/GetFilterHighDate.php
api/v3/examples/PledgePaymentCreate.php
api/v3/examples/PledgePaymentGet.php
api/v3/examples/PledgePaymentUpdate.php
api/v3/examples/ProfileApply.php
api/v3/examples/ProfileSet.php
api/v3/examples/Survey/ChainedGetDelete.php
api/v3/examples/SurveyCreate.php
api/v3/examples/SurveyGet.php
api/v3/examples/UFGroupCreate.php
api/v3/examples/UFGroupDelete.php
api/v3/examples/UFGroupGet.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

index 55e2297d3aeb88fd7fc816de7a20addf36cb4a55..7ab643f1156d6be209a6f22b4e5e3300289389a2 100644 (file)
@@ -44,7 +44,7 @@ function batch_create_expectedresult(){
           'title' => 'New Batch 03',
           'description' => 'This is description for New Batch 03',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_id' => '',
           'modified_date' => '2012-11-14 16:02:35',
           'saved_search_id' => '',
index 109789ce94a07775a4c96930847a3ffc5a3321ad..ca87f7df19bd48fbfa11afb7725993cc8d0be154 100644 (file)
@@ -44,7 +44,7 @@ function batch_update_expectedresult(){
           'title' => 'New Batch 04',
           'description' => 'This is description for New Batch 04',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_id' => '',
           'modified_date' => '2012-11-14 16:02:35',
           'saved_search_id' => '',
index e5094280f572157a03a6e8d2aaa14f46fbd96e54..e3afaaddb395d7da6be4d00ca11be8bbff3d1563 100644 (file)
@@ -48,7 +48,7 @@ function campaign_create_expectedresult(){
           'parent_id' => '',
           'is_active' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'last_modified_id' => '',
           'last_modified_date' => '',
           'goal_general' => '',
index 2fac41eaae0b2ff40c3124b89510b5793e7eaa3a..ce69a6196eab0078fe4c5667af8c3c802cca8203 100644 (file)
@@ -41,7 +41,7 @@ function campaign_get_expectedresult(){
           'title' => 'campaign title',
           'description' => 'Call people, ask for money',
           'is_active' => '1',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
         ),
     ),
 );
index e303628b40430037cc5cd396c9e829b8ae5fcd74..f4721e23b9b0065d50052bb92289a53757bd53df 100644 (file)
@@ -87,7 +87,7 @@ function contact_create_expectedresult(){
           'organization_name' => '',
           'sic_code' => '',
           'user_unique_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_date' => '2012-11-14 16:02:35',
           'api.tag.create' => 6,
           'api.entity_tag.create' => array(
index fcc1bacb279a75bb62e6e2b47133e9a9fc9738dd..54a3444fa40f7d5cb55c505f1c2e15c692c2929d 100644 (file)
@@ -99,7 +99,7 @@ function contact_create_expectedresult(){
           'organization_name' => '',
           'sic_code' => '',
           'user_unique_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_date' => '2012-11-14 16:02:35',
           'api.contribution.create' => array(
               'is_error' => 0,
index 83acfc5f8ddd3770b4d4b63c68434d3789a5cb04..5bc0f922faa53832a2052d0d0c935989002991eb 100644 (file)
@@ -102,7 +102,7 @@ function contact_create_expectedresult(){
           'organization_name' => '',
           'sic_code' => '',
           'user_unique_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_date' => '2012-11-14 16:02:35',
           'api.contribution.create' => array(
               'is_error' => 0,
index 9f9e0b843817a53e4de19bfe9c7bc4fab90ae110..12bf3d8eddce67c5add9a8ca13f4afe480e287a9 100644 (file)
@@ -80,7 +80,7 @@ function contact_create_expectedresult(){
           'organization_name' => '',
           'sic_code' => '',
           'user_unique_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_date' => '2012-11-14 16:02:35',
         ),
     ),
index b2ae487b5776a02e1bc6aa35b236eb2869b68dd9..ae07948fb156de0ddc7871101b13f436abd1f13c 100644 (file)
@@ -81,7 +81,7 @@ function contribution_page_create_expectedresult(){
           'start_date' => '',
           'end_date' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'currency' => 'NZD',
           'campaign_id' => '',
           'is_share' => '',
index c57089324775a8a968792d1c25a2971c96a37703..7aa448a1d6ea5f452a741dfcdfe169863c7d28ed 100644 (file)
@@ -62,7 +62,7 @@ function custom_group_create_expectedresult(){
           'max_multiple' => 'null',
           'collapse_adv_display' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'is_reserved' => '',
         ),
     ),
index 35e38236b3f0890c77b26793c42cb47808ccc87f..af5302ddad9a0f1364ebcc1149c920adb045f4cf 100644 (file)
@@ -63,7 +63,7 @@ function event_get_expectedresult(){
           'is_multiple_registrations' => 0,
           'allow_same_participant_emails' => 0,
           'is_template' => 0,
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'is_share' => '1',
         ),
     ),
index 24d7e2ec6f39f87d4fb977fe25aa892d34ba872a..37de47de34ea667dd5aae1d6946b93102d1cf53d 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 08:49:19',
+  'created_date' => '2013-07-28 19:57:44',
   'is_share' => '1',
   'available_places' => 0,
   'is_full' => '1',
index bee390e79c30f25997f32ee392ce2e86ad9162de..5ac4c699c8cebd7a79048ec0dcf5d1cde9181f14 100644 (file)
@@ -105,7 +105,7 @@ function event_create_expectedresult(){
           'is_template' => 0,
           'template_title' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'currency' => '',
           'campaign_id' => '',
           'is_share' => '',
index cd349e32d76e26fb6d4328adb3c9ec53e52a90c3..f57b517172283608c94df57f0225052d43fe1059 100644 (file)
@@ -55,7 +55,7 @@ function event_get_expectedresult(){
           'is_multiple_registrations' => 0,
           'allow_same_participant_emails' => 0,
           'is_template' => 0,
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'is_share' => '1',
         ),
     ),
index 65319a465f5d83c29e23929b5b5ec70bf2393456..af7907488267b784f1df7a9de0f916e8950fd638 100644 (file)
@@ -36,7 +36,7 @@ function grant_get_expectedresult(){
       '2' => array(
           'id' => '2',
           'contact_id' => '4',
-          'application_received_date' => '2013-07-28',
+          'application_received_date' => '20130728084957',
           'decision_date' => '2013-07-29',
           'grant_type_id' => '1',
           'amount_total' => '500.00',
index 7fab57269cbec9afe2878d450d4a4ebef5562a99..90e2b993bbdf65d18ae4c87905ca0874cb31078b 100644 (file)
@@ -60,7 +60,7 @@ function mailing_create_expectedresult(){
           'msg_template_id' => '',
           'override_verp' => '1',
           'created_id' => '1',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'scheduled_id' => '',
           'scheduled_date' => '20130728085413',
           'approver_id' => '1',
index 99821a9f64b5742c75adbfc34b4fa0aa37d13ed9..23c4e8c9df0929b3a16dc2d440a40a26d1631fdd 100644 (file)
@@ -38,7 +38,7 @@ function mailing_group_subscribe_expectedresult(){
   'values' => array(
       'contact_id' => '3',
       'subscribe_id' => '1',
-      'hash' => 'fcf4e727e2a34e5d',
+      'hash' => 'bf4d724dbbb38c0c',
       'is_error' => 0,
     ),
 );
index 64b9ea3f957bc9aacbde70b5fa7d3153193736bf..fa103849e871ff593f97d8c79c73ece097ed4528 100644 (file)
@@ -94,7 +94,7 @@ function participant_create_expectedresult(){
           'organization_name' => '',
           'sic_code' => '',
           'user_unique_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_date' => '2012-11-14 16:02:35',
           'api.participant' => 4,
           'api.contribution.create' => 1,
index d4b3cf5cfe500ff432d7ee0fb4f9cb41da21fd4e..2566c1bc4b23bf43c280f41212639bbeafeef5c2 100644 (file)
@@ -97,7 +97,7 @@ function participant_get_expectedresult(){
                       'is_multiple_registrations' => 0,
                       'allow_same_participant_emails' => 0,
                       'is_template' => 0,
-                      'created_date' => '2013-07-28 05:52:14',
+                      'created_date' => '2013-07-28 08:49:19',
                       'is_share' => '1',
                     ),
                 ),
index 7ab91d0fc52f90a425116003f69889bbeab30062..44eb58d308589142c4fdbc24d54a724cec3acb20 100644 (file)
@@ -5,7 +5,7 @@
  */
 function pledge_get_example(){
 $params = array(
-  'pledge_start_date_high' => '20130726090416',
+  'pledge_start_date_high' => '20130726201306',
 );
 
 try{
index d7b10206c85f44ccdbec0c22b3b55c9ff647fec6..1e91350edf2b6c56525df58ab869d6647414eb7a 100644 (file)
@@ -44,7 +44,7 @@ function pledge_payment_create_expectedresult(){
           'scheduled_amount' => '',
           'actual_amount' => '20',
           'currency' => 'USD',
-          'scheduled_date' => '',
+          'scheduled_date' => '20130728085413',
           'reminder_date' => '',
           'reminder_count' => '',
           'status_id' => '1',
index 44d4c0ac62eaca27e942c77a7184ab6813e3501b..717fa75f5978faa1ea56dbcb546cd459feff494c 100644 (file)
@@ -35,7 +35,7 @@ function pledge_payment_get_expectedresult(){
           'pledge_id' => '1',
           'scheduled_amount' => '20.00',
           'currency' => 'USD',
-          'scheduled_date' => '2013-07-28 00:00:00',
+          'scheduled_date' => '20130728085413',
           'reminder_count' => 0,
           'status_id' => '2',
         ),
@@ -44,7 +44,7 @@ function pledge_payment_get_expectedresult(){
           'pledge_id' => '1',
           'scheduled_amount' => '20.00',
           'currency' => 'USD',
-          'scheduled_date' => '2018-07-28 00:00:00',
+          'scheduled_date' => '20130728085413',
           'reminder_count' => 0,
           'status_id' => '2',
         ),
@@ -53,7 +53,7 @@ function pledge_payment_get_expectedresult(){
           'pledge_id' => '1',
           'scheduled_amount' => '20.00',
           'currency' => 'USD',
-          'scheduled_date' => '2023-07-28 00:00:00',
+          'scheduled_date' => '20130728085413',
           'reminder_count' => 0,
           'status_id' => '2',
         ),
@@ -62,7 +62,7 @@ function pledge_payment_get_expectedresult(){
           'pledge_id' => '1',
           'scheduled_amount' => '20.00',
           'currency' => 'USD',
-          'scheduled_date' => '2028-07-28 00:00:00',
+          'scheduled_date' => '20130728085413',
           'reminder_count' => 0,
           'status_id' => '2',
         ),
@@ -71,7 +71,7 @@ function pledge_payment_get_expectedresult(){
           'pledge_id' => '1',
           'scheduled_amount' => '20.00',
           'currency' => 'USD',
-          'scheduled_date' => '2033-07-28 00:00:00',
+          'scheduled_date' => '20130728085413',
           'reminder_count' => 0,
           'status_id' => '2',
         ),
index 8905465e257f755409bc2fb1e932e2e64f4611ce..1fa3a233d6bfa753ac2564152ddb4520ef6676d6 100644 (file)
@@ -41,7 +41,7 @@ function pledge_payment_update_expectedresult(){
           'scheduled_amount' => '20.00',
           'actual_amount' => '20.00',
           'currency' => 'USD',
-          'scheduled_date' => '20130728000000',
+          'scheduled_date' => '20130728085413',
           'reminder_date' => '',
           'reminder_count' => 0,
           'status_id' => '1',
index 768386e948c5e1743d040fe717ec30a9e669819c..24368a7dd57f9049b2f5eb1b1e88a9044f5cd1a5 100644 (file)
@@ -37,13 +37,14 @@ function profile_apply_expectedresult(){
   $expectedResult = array(
   'is_error' => 0,
   'version' => 3,
-  'count' => 10,
+  'count' => 11,
   'values' => array(
       'contact_type' => 'Individual',
       'contact_sub_type' => '',
       'contact_id' => 1,
-      'profile_id' => 25,
       'version' => 3,
+      'debug' => 1,
+      'profile_id' => 25,
       'first_name' => 'abc2',
       'last_name' => 'xyz2',
       'email' => array(
index 2e4426892a95565865fc11e8c4c140086bef0f32..df358ea6e102730605148c6647e43038d0ebcd6d 100644 (file)
@@ -84,7 +84,7 @@ function profile_set_expectedresult(){
           'organization_name' => '',
           'sic_code' => '',
           'user_unique_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'modified_date' => '2012-11-14 16:02:35',
         ),
     ),
index d2db10179a306a3ff0a77596ae8072f8b4d2f46c..c68bab17dc9a907f842ac28e4d222c2f3a3a366d 100644 (file)
@@ -42,7 +42,7 @@ function survey_get_expectedresult(){
           'max_number_of_contacts' => '12',
           'is_active' => '1',
           'is_default' => 0,
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'bypass_confirm' => 0,
           'api.survey.delete' => array(
               'is_error' => 0,
index 763f3771160e338833204ebc24891065e26f51a0..496e5d795af9c1b405ae4187bef4fd77fd0a4d26 100644 (file)
@@ -49,7 +49,7 @@ function survey_create_expectedresult(){
           'is_active' => '',
           'is_default' => '',
           'created_id' => '',
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'last_modified_id' => '',
           'last_modified_date' => '',
           'result_id' => '',
index 322815ef92242c5b49da6995d19d8efca8032aa3..bbbab582a2df178e0ae77ba2460b4a2417e077ce 100644 (file)
@@ -44,7 +44,7 @@ function survey_get_expectedresult(){
           'max_number_of_contacts' => '12',
           'is_active' => '1',
           'is_default' => 0,
-          'created_date' => '2013-07-28 05:52:14',
+          'created_date' => '2013-07-28 08:49:19',
           'bypass_confirm' => 0,
         ),
     ),
index 866e7be4694773913c15882ab037a6535b73ab4c..da390e82214f410a0ff8304e0cb17b81b03d76ab 100644 (file)
@@ -6,11 +6,11 @@
 function uf_group_create_example(){
 $params = array(
   'add_captcha' => 1,
-  'add_contact_to_group' => 2,
+  'add_contact_to_group' => 1,
+  'group' => 1,
   'cancel_URL' => 'http://example.org/cancel',
   'created_date' => '2009-06-27 00:00:00',
-  'created_id' => 69,
-  'group' => 2,
+  'created_id' => 1,
   'group_type' => 'Individual,Contact',
   'help_post' => 'help post',
   'help_pre' => 'help pre',
@@ -50,18 +50,18 @@ function uf_group_create_expectedresult(){
   'is_error' => 0,
   'version' => 3,
   'count' => 1,
-  'id' => 12,
+  'id' => 2,
   'values' => array(
-      '12' => array(
-          'id' => '12',
+      '2' => array(
+          'id' => '2',
           'is_active' => 0,
           'group_type' => 'Individual,Contact',
           'title' => 'Test Group',
           'help_pre' => 'help pre',
           'help_post' => 'help post',
-          'limit_listings_group_id' => '2',
+          'limit_listings_group_id' => '1',
           'post_URL' => 'http://example.org/post',
-          'add_to_group_id' => '2',
+          'add_to_group_id' => '1',
           'add_captcha' => '1',
           'is_map' => '1',
           'is_edit_link' => '1',
@@ -71,8 +71,8 @@ function uf_group_create_expectedresult(){
           'is_cms_user' => '1',
           'notify' => 'admin@example.org',
           'is_reserved' => '1',
-          'name' => 'Test_Group_12',
-          'created_id' => '69',
+          'name' => 'Test_Group_2',
+          'created_id' => '1',
           'created_date' => '2013-07-28 05:52:14',
           'is_proximity_search' => '',
         ),
index 4b190d4faf8b2bd727e2010fd6a6185e29f89c20..7ec6db9d7207ea4b2a6de0fd6c1d88f2221b61aa 100644 (file)
@@ -5,26 +5,7 @@
  */
 function uf_group_delete_example(){
 $params = array(
-  'add_captcha' => 1,
-  'add_contact_to_group' => 2,
-  'cancel_URL' => 'http://example.org/cancel',
-  'created_date' => '2009-06-27 00:00:00',
-  'created_id' => 69,
-  'group' => 2,
-  'group_type' => 'Individual,Contact',
-  'help_post' => 'help post',
-  'help_pre' => 'help pre',
-  'is_active' => 0,
-  'is_cms_user' => 1,
-  'is_edit_link' => 1,
-  'is_map' => 1,
-  'is_reserved' => 1,
-  'is_uf_link' => 1,
-  'is_update_dupe' => 1,
-  'name' => 'Test_Group',
-  'notify' => 'admin@example.org',
-  'post_URL' => 'http://example.org/post',
-  'title' => 'Test Group',
+  'id' => 2,
 );
 
 try{
index 64c5ac1ab69399675e75d7186e21005315dd0965..81e2a6c9dbb016520f68cb60198262847a45f82d 100644 (file)
@@ -5,26 +5,7 @@
  */
 function uf_group_get_example(){
 $params = array(
-  'add_captcha' => 1,
-  'add_contact_to_group' => 2,
-  'cancel_URL' => 'http://example.org/cancel',
-  'created_date' => '2009-06-27 00:00:00',
-  'created_id' => 69,
-  'group' => 2,
-  'group_type' => 'Individual,Contact',
-  'help_post' => 'help post',
-  'help_pre' => 'help pre',
-  'is_active' => 0,
-  'is_cms_user' => 1,
-  'is_edit_link' => 1,
-  'is_map' => 1,
-  'is_reserved' => 1,
-  'is_uf_link' => 1,
-  'is_update_dupe' => 1,
-  'name' => 'Test_Group',
-  'notify' => 'admin@example.org',
-  'post_URL' => 'http://example.org/post',
-  'title' => 'Test Group',
+  'id' => 2,
 );
 
 try{
@@ -50,18 +31,18 @@ function uf_group_get_expectedresult(){
   'is_error' => 0,
   'version' => 3,
   'count' => 1,
-  'id' => 12,
+  'id' => 2,
   'values' => array(
-      '12' => array(
-          'id' => '12',
+      '2' => array(
+          'id' => '2',
           'is_active' => 0,
           'group_type' => 'Individual,Contact',
           'title' => 'Test Group',
           'help_pre' => 'help pre',
           'help_post' => 'help post',
-          'limit_listings_group_id' => '2',
+          'limit_listings_group_id' => '1',
           'post_URL' => 'http://example.org/post',
-          'add_to_group_id' => '2',
+          'add_to_group_id' => '1',
           'add_captcha' => '1',
           'is_map' => '1',
           'is_edit_link' => '1',
@@ -71,8 +52,8 @@ function uf_group_get_expectedresult(){
           'is_cms_user' => '1',
           'notify' => 'admin@example.org',
           'is_reserved' => '1',
-          'name' => 'Test_Group_12',
-          'created_id' => '69',
+          'name' => 'Test_Group_2',
+          'created_id' => '1',
           'created_date' => '2013-07-28 05:52:14',
           'is_proximity_search' => 0,
         ),
index e3ecb795f97ff34cd6653a27faf89ed4669c257b..b627d381af819e1ba10337771a8e100c9ab4cfe9 100644 (file)
@@ -1929,8 +1929,13 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
     $fieldsToChange = array(
       'hash' => '67eac7789eaee00',
       'modified_date' => '2012-11-14 16:02:35',
-      'created_date' => '2013-07-28 05:52:14',
+      'created_date' => '2013-07-28 08:49:19',
       'create_date' => '20120130621222105',
+      'application_received_date' => '20130728084957',
+      'in_date' => '2013-07-28 08:50:19',
+      'scheduled_date' => '20130728085413',
+      'approval_date' => '20130728085413',
+      'pledge_start_date_high' => '20130726090416',
     );
 
     $keysToUnset = array('xdebug', 'undefined_fields',);
index 7f221c213ef18ba3165efe4dd8f22e3580bf9f4f..85f00009e9628ffa8e7281fdc708a73b422b7051 100644 (file)
@@ -564,10 +564,10 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
    * @dataProvider entities_create
    */
   public function testEmptyParam_create($Entity) {
-    $this->markTestIncomplete("fixing this test to test the api functions fails on numberous tests 
-      which will either create a completely blank entity (batch, participant status) or 
+    $this->markTestIncomplete("fixing this test to test the api functions fails on numberous tests
+      which will either create a completely blank entity (batch, participant status) or
       have a damn good crack at it (e.g mailing job). Marking this as incomplete beats false success");
-    // 
+    //
     return;
     if (in_array($Entity, $this->toBeImplemented['create'])) {
       // $this->markTestIncomplete("civicrm_api3_{$Entity}_create to be implemented");
@@ -717,7 +717,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
       if (!empty($specs['pseudoconstant']) || !empty($specs['enumValues'])) {
         $options = civicrm_api($entityName, 'getoptions', array('context' => 'create', 'field' => $field, 'version' => 3));
         if (empty($options['values'])) {
-          print_r($options);
         }
         $entity[$field] = array_rand($options['values']);
       }
@@ -727,11 +726,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
         $field => $entity[$field],
       );
 
-      $update = civicrm_api($entityName, 'create', $updateParams);
-      if(!empty($update['is_error'])){
-        print_r($update);
-      }
-      $this->assertAPISuccess($update, print_r($updateParams, TRUE) . 'in line ' . __LINE__);
+      $update = $this->callAPISuccess($entityName, 'create', $updateParams);
       $checkParams = array(
         'id' => $entity['id'],
         'version' => 3,
@@ -743,11 +738,9 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
         ),
       );
 
-      $checkEntity = civicrm_api($entityName, 'getsingle', $checkParams);
-      $this->assertEquals($entity, $checkEntity, "changing field $fieldName\n" .
-        print_r($entity, TRUE)
+      $checkEntity = $this->callAPISuccess($entityName, 'getsingle', $checkParams);
+      $this->assertAPIArrayComparison($entity, $checkEntity, array(), "changing field $fieldName\n");
         //print_r(array('update-params' => $updateParams, 'update-result' => $update, 'getsingle-params' => $checkParams, 'getsingle-result' => $checkEntity, 'expected entity' => $entity), TRUE)
-      );
 
     }
     $baoObj->deleteTestObjects($baoString);