fix to syntax conformance test handling of contribution_type_id
authorEileen McNaughton <eileen@fuzion.co.nz>
Tue, 3 Jun 2014 12:59:41 +0000 (00:59 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Tue, 3 Jun 2014 12:59:41 +0000 (00:59 +1200)
tests/phpunit/api/v3/SyntaxConformanceTest.php

index 3793e52431443f358480e4301659d2ecf6001678..b065ddc659302fe54949860f9d2b3d4a45ee365a 100644 (file)
@@ -975,6 +975,10 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
         'id' => $entity['id'],
         $field => isset($entity[$field]) ? $entity[$field] : NULL,
       );
+      if(isset($updateParams['financial_type_id'])) {
+        //api has special handling on these 2 fields for backward compatibility reasons
+        $entity['contribution_type_id'] = $updateParams['financial_type_id'];
+      }
 
       $update = $this->callAPISuccess($entityName, 'create', $updateParams);
       $checkParams = array(