CRM-13072 upgrade Paritipant Payment test classes to pass
[civicrm-core.git] / tests / phpunit / api / v3 / ACLCachingTest.php
index a639bad66d47d641ba700aa80249fd5a6c6001aa..1e41a1cc6139383060a20343e6c3ff0dd8e4329f 100644 (file)
@@ -36,16 +36,13 @@ require_once 'CiviTest/CiviUnitTestCase.php';
  */
 
 class api_v3_ACLCachingTest extends CiviUnitTestCase {
-  protected $_apiversion;
+  protected $_apiversion = 3;
   protected $_params;
 
   public $_eNoticeCompliant = TRUE;
 
   function setUp() {
-    $this->_apiversion = 3;
-
     parent::setUp();
-
   }
 /**
  * (non-PHPdoc)
@@ -59,12 +56,12 @@ class api_v3_ACLCachingTest extends CiviUnitTestCase {
   }
 
   function testActivityCreateCustomBefore() {
-    $values = civicrm_api('custom_field', 'getoptions', array('field' => 'custom_group_id', 'version' => 3));
+    $values = $this->callAPISuccess('custom_field', 'getoptions', array('field' => 'custom_group_id',));
     $this->assertTrue($values['count'] == 0);
-    $this->CustomGroupCreate('Activity', 'cachingtest');
-    $groupCount = civicrm_api('custom_group', 'getcount', array('version' => 3, 'extends' => 'activity'));
+    $this->CustomGroupCreate(array('extends' => 'Activity'));
+    $groupCount = $this->callAPISuccess('custom_group', 'getcount', array('extends' => 'activity'));
     $this->assertEquals($groupCount, 1, 'one group should now exist');
-    $values = civicrm_api('custom_field', 'getoptions', array('field' => 'custom_group_id', 'version' => 3));
+    $values = $this->callAPISuccess('custom_field', 'getoptions', array('field' => 'custom_group_id'));
     $this->assertTrue($values['count'] == 1, 'check that cached value is not retained for custom_group_id');
   }
 }