-- CRM-13889 APIs for Dashboard, DashboardContact and new hook hook_civicrm_dashboard...
[civicrm-core.git] / tests / phpunit / api / v3 / SyntaxConformanceTest.php
index 5bcff6511ef926b80e94a36d8cefcca6b79e0ed3..38ac526470f16f6290a5efb532887f00eb9cf84f 100644 (file)
@@ -90,19 +90,19 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
 
   public static function entities_get() {
     // all the entities, beside the ones flagged
-    return api_v3_SyntaxConformanceTest::entities(static::toBeSkipped_get(TRUE));
+    return static::entities(static::toBeSkipped_get(TRUE));
   }
 
   public static function entities_create() {
-    return api_v3_SyntaxConformanceTest::entities(static::toBeSkipped_create(TRUE));
+    return static::entities(static::toBeSkipped_create(TRUE));
   }
 
   public static function entities_updatesingle() {
-    return api_v3_SyntaxConformanceTest::entities(static::toBeSkipped_updatesingle(TRUE));
+    return static::entities(static::toBeSkipped_updatesingle(TRUE));
   }
 
   public static function entities_delete() {
-    return api_v3_SyntaxConformanceTest::entities(static::toBeSkipped_delete(TRUE));
+    return static::entities(static::toBeSkipped_delete(TRUE));
   }
 
   public static function toBeSkipped_get($sequential = FALSE) {
@@ -156,7 +156,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');
+    $entitiesWithoutGet = array('MailingContact', 'EntityTag', 'Participant', 'ParticipantPayment', 'Setting', 'SurveyRespondant', 'MailingRecipients',  'CustomSearch', 'Extension', 'ReportTemplate', 'System', 'DashboardContact');
     if ($sequential === TRUE) {
       return $entitiesWithoutGet;
     }
@@ -235,6 +235,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
       'MailSettings',
       'Setting',
       'MailingContact',
+      'DashboardContact',
     );
     if ($sequential === TRUE) {
       return $entitiesWithout;
@@ -252,6 +253,11 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
   public function getKnownUnworkablesUpdateSingle($entity, $key){
     // can't update values are values for which updates don't result in the value being changed
     $knownFailures = array(
+      'ActionSchedule' => array(
+        'cant_update' => array(
+          'group_id',
+        ),
+      ),
       'Address' => array(
         'cant_update' => array(
           'state_province_id', //issues with country id - need to ensure same country
@@ -738,9 +744,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(), "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);
     $baoObj->free();