From: eileen Date: Sun, 28 Jul 2013 19:44:17 +0000 (+1200) Subject: CRM-13072 tidy up of examples, syntax conformance debug X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f27f272455b03c3241bc3bb8f27782ebd9856c2b;p=civicrm-core.git CRM-13072 tidy up of examples, syntax conformance debug --- diff --git a/api/v3/examples/BatchCreate.php b/api/v3/examples/BatchCreate.php index 55e2297d3a..7ab643f115 100644 --- a/api/v3/examples/BatchCreate.php +++ b/api/v3/examples/BatchCreate.php @@ -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' => '', diff --git a/api/v3/examples/BatchUpdate.php b/api/v3/examples/BatchUpdate.php index 109789ce94..ca87f7df19 100644 --- a/api/v3/examples/BatchUpdate.php +++ b/api/v3/examples/BatchUpdate.php @@ -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' => '', diff --git a/api/v3/examples/CampaignCreate.php b/api/v3/examples/CampaignCreate.php index e5094280f5..e3afaaddb3 100644 --- a/api/v3/examples/CampaignCreate.php +++ b/api/v3/examples/CampaignCreate.php @@ -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' => '', diff --git a/api/v3/examples/CampaignGet.php b/api/v3/examples/CampaignGet.php index 2fac41eaae..ce69a6196e 100644 --- a/api/v3/examples/CampaignGet.php +++ b/api/v3/examples/CampaignGet.php @@ -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', ), ), ); diff --git a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php index e303628b40..f4721e23b9 100644 --- a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php +++ b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php @@ -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( diff --git a/api/v3/examples/Contact/ChainTwoWebsites.php b/api/v3/examples/Contact/ChainTwoWebsites.php index fcc1bacb27..54a3444fa4 100644 --- a/api/v3/examples/Contact/ChainTwoWebsites.php +++ b/api/v3/examples/Contact/ChainTwoWebsites.php @@ -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, diff --git a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php index 83acfc5f8d..5bc0f922fa 100644 --- a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php +++ b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php @@ -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, diff --git a/api/v3/examples/ContactCreate.php b/api/v3/examples/ContactCreate.php index 9f9e0b8438..12bf3d8edd 100644 --- a/api/v3/examples/ContactCreate.php +++ b/api/v3/examples/ContactCreate.php @@ -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', ), ), diff --git a/api/v3/examples/ContributionPageCreate.php b/api/v3/examples/ContributionPageCreate.php index b2ae487b57..ae07948fb1 100644 --- a/api/v3/examples/ContributionPageCreate.php +++ b/api/v3/examples/ContributionPageCreate.php @@ -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' => '', diff --git a/api/v3/examples/CustomGroupCreate.php b/api/v3/examples/CustomGroupCreate.php index c570893247..7aa448a1d6 100644 --- a/api/v3/examples/CustomGroupCreate.php +++ b/api/v3/examples/CustomGroupCreate.php @@ -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' => '', ), ), diff --git a/api/v3/examples/Event/IsCurrentOption.php b/api/v3/examples/Event/IsCurrentOption.php index 35e38236b3..af5302ddad 100644 --- a/api/v3/examples/Event/IsCurrentOption.php +++ b/api/v3/examples/Event/IsCurrentOption.php @@ -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', ), ), diff --git a/api/v3/examples/Event/IsFullOption.php b/api/v3/examples/Event/IsFullOption.php index 24d7e2ec6f..37de47de34 100644 --- a/api/v3/examples/Event/IsFullOption.php +++ b/api/v3/examples/Event/IsFullOption.php @@ -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', diff --git a/api/v3/examples/EventCreate.php b/api/v3/examples/EventCreate.php index bee390e79c..5ac4c699c8 100644 --- a/api/v3/examples/EventCreate.php +++ b/api/v3/examples/EventCreate.php @@ -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' => '', diff --git a/api/v3/examples/EventGet.php b/api/v3/examples/EventGet.php index cd349e32d7..f57b517172 100644 --- a/api/v3/examples/EventGet.php +++ b/api/v3/examples/EventGet.php @@ -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', ), ), diff --git a/api/v3/examples/GrantGet.php b/api/v3/examples/GrantGet.php index 65319a465f..af79074882 100644 --- a/api/v3/examples/GrantGet.php +++ b/api/v3/examples/GrantGet.php @@ -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', diff --git a/api/v3/examples/MailingCreate.php b/api/v3/examples/MailingCreate.php index 7fab57269c..90e2b993bb 100644 --- a/api/v3/examples/MailingCreate.php +++ b/api/v3/examples/MailingCreate.php @@ -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', diff --git a/api/v3/examples/MailingGroupSubscribe.php b/api/v3/examples/MailingGroupSubscribe.php index 99821a9f64..23c4e8c9df 100644 --- a/api/v3/examples/MailingGroupSubscribe.php +++ b/api/v3/examples/MailingGroupSubscribe.php @@ -38,7 +38,7 @@ function mailing_group_subscribe_expectedresult(){ 'values' => array( 'contact_id' => '3', 'subscribe_id' => '1', - 'hash' => 'fcf4e727e2a34e5d', + 'hash' => 'bf4d724dbbb38c0c', 'is_error' => 0, ), ); diff --git a/api/v3/examples/Participant/CreateParticipantPayment.php b/api/v3/examples/Participant/CreateParticipantPayment.php index 64b9ea3f95..fa103849e8 100644 --- a/api/v3/examples/Participant/CreateParticipantPayment.php +++ b/api/v3/examples/Participant/CreateParticipantPayment.php @@ -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, diff --git a/api/v3/examples/Participant/NestedEventGet.php b/api/v3/examples/Participant/NestedEventGet.php index d4b3cf5cfe..2566c1bc4b 100644 --- a/api/v3/examples/Participant/NestedEventGet.php +++ b/api/v3/examples/Participant/NestedEventGet.php @@ -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', ), ), diff --git a/api/v3/examples/Pledge/GetFilterHighDate.php b/api/v3/examples/Pledge/GetFilterHighDate.php index 7ab91d0fc5..44eb58d308 100644 --- a/api/v3/examples/Pledge/GetFilterHighDate.php +++ b/api/v3/examples/Pledge/GetFilterHighDate.php @@ -5,7 +5,7 @@ */ function pledge_get_example(){ $params = array( - 'pledge_start_date_high' => '20130726090416', + 'pledge_start_date_high' => '20130726201306', ); try{ diff --git a/api/v3/examples/PledgePaymentCreate.php b/api/v3/examples/PledgePaymentCreate.php index d7b10206c8..1e91350edf 100644 --- a/api/v3/examples/PledgePaymentCreate.php +++ b/api/v3/examples/PledgePaymentCreate.php @@ -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', diff --git a/api/v3/examples/PledgePaymentGet.php b/api/v3/examples/PledgePaymentGet.php index 44d4c0ac62..717fa75f59 100644 --- a/api/v3/examples/PledgePaymentGet.php +++ b/api/v3/examples/PledgePaymentGet.php @@ -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', ), diff --git a/api/v3/examples/PledgePaymentUpdate.php b/api/v3/examples/PledgePaymentUpdate.php index 8905465e25..1fa3a233d6 100644 --- a/api/v3/examples/PledgePaymentUpdate.php +++ b/api/v3/examples/PledgePaymentUpdate.php @@ -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', diff --git a/api/v3/examples/ProfileApply.php b/api/v3/examples/ProfileApply.php index 768386e948..24368a7dd5 100644 --- a/api/v3/examples/ProfileApply.php +++ b/api/v3/examples/ProfileApply.php @@ -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( diff --git a/api/v3/examples/ProfileSet.php b/api/v3/examples/ProfileSet.php index 2e4426892a..df358ea6e1 100644 --- a/api/v3/examples/ProfileSet.php +++ b/api/v3/examples/ProfileSet.php @@ -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', ), ), diff --git a/api/v3/examples/Survey/ChainedGetDelete.php b/api/v3/examples/Survey/ChainedGetDelete.php index d2db10179a..c68bab17dc 100644 --- a/api/v3/examples/Survey/ChainedGetDelete.php +++ b/api/v3/examples/Survey/ChainedGetDelete.php @@ -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, diff --git a/api/v3/examples/SurveyCreate.php b/api/v3/examples/SurveyCreate.php index 763f377116..496e5d795a 100644 --- a/api/v3/examples/SurveyCreate.php +++ b/api/v3/examples/SurveyCreate.php @@ -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' => '', diff --git a/api/v3/examples/SurveyGet.php b/api/v3/examples/SurveyGet.php index 322815ef92..bbbab582a2 100644 --- a/api/v3/examples/SurveyGet.php +++ b/api/v3/examples/SurveyGet.php @@ -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, ), ), diff --git a/api/v3/examples/UFGroupCreate.php b/api/v3/examples/UFGroupCreate.php index 866e7be469..da390e8221 100644 --- a/api/v3/examples/UFGroupCreate.php +++ b/api/v3/examples/UFGroupCreate.php @@ -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' => '', ), diff --git a/api/v3/examples/UFGroupDelete.php b/api/v3/examples/UFGroupDelete.php index 4b190d4faf..7ec6db9d72 100644 --- a/api/v3/examples/UFGroupDelete.php +++ b/api/v3/examples/UFGroupDelete.php @@ -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{ diff --git a/api/v3/examples/UFGroupGet.php b/api/v3/examples/UFGroupGet.php index 64c5ac1ab6..81e2a6c9db 100644 --- a/api/v3/examples/UFGroupGet.php +++ b/api/v3/examples/UFGroupGet.php @@ -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, ), diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index e3ecb795f9..b627d381af 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -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',); diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 7f221c213e..85f00009e9 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -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);