From dcf562005c012f12caaceafd91f549862c4616f8 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 16 Jan 2014 18:10:21 -0800 Subject: [PATCH] CRM-13889 - api/v3/DashboardContact - Remove exemption for SyntaxConformanceTest. Fix bugs. --- CRM/Contact/BAO/DashboardContact.php | 36 +++++++++++++++++ CRM/Core/BAO/Dashboard.php | 6 ++- api/v3/DashboardContact.php | 39 +++++++++---------- tests/phpunit/api/v3/DashboardContactTest.php | 2 +- .../phpunit/api/v3/SyntaxConformanceTest.php | 18 ++++++--- 5 files changed, 73 insertions(+), 28 deletions(-) create mode 100644 CRM/Contact/BAO/DashboardContact.php diff --git a/CRM/Contact/BAO/DashboardContact.php b/CRM/Contact/BAO/DashboardContact.php new file mode 100644 index 0000000000..5862b04b5d --- /dev/null +++ b/CRM/Contact/BAO/DashboardContact.php @@ -0,0 +1,36 @@ + 3)); if (!is_array($skip)) { $skip = array(); @@ -156,7 +165,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { * @return multitype:string |multitype:multitype:string */ public static function toBeSkipped_automock($sequential = FALSE) { - $entitiesWithoutGet = array('MailingContact', 'EntityTag', 'Participant', 'ParticipantPayment', 'Setting', 'SurveyRespondant', 'MailingRecipients', 'CustomSearch', 'Extension', 'ReportTemplate', 'System', 'DashboardContact'); + $entitiesWithoutGet = array('MailingContact', 'EntityTag', 'Participant', 'ParticipantPayment', 'Setting', 'SurveyRespondant', 'MailingRecipients', 'CustomSearch', 'Extension', 'ReportTemplate', 'System'); if ($sequential === TRUE) { return $entitiesWithoutGet; } @@ -235,7 +244,6 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { 'MailSettings', 'Setting', 'MailingContact', - 'DashboardContact', ); if ($sequential === TRUE) { return $entitiesWithout; @@ -741,7 +749,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { ); $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)); + $this->assertAPIArrayComparison($entity, $checkEntity, array(), "checking if $fieldName was correctly updaetd\n" . print_r(array('update-params' => $updateParams, 'update-result' => $update, 'getsingle-params' => $checkParams, 'getsingle-result' => $checkEntity, 'expected entity' => $entity), TRUE)); } $baoObj->deleteTestObjects($baoString); $baoObj->free(); -- 2.25.1