4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.3 |
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2013 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
29 require_once 'CiviTest/CiviUnitTestCase.php';
32 * This class is intended to test ACL permission using the multisite module
34 * @package CiviCRM_APIv3
35 * @subpackage API_Contact
38 class api_v3_ACLCachingTest
extends CiviUnitTestCase
{
39 protected $_apiversion = 3;
41 public $_eNoticeCompliant = TRUE;
42 public $DBResetRequired = FALSE;
49 * @see CiviUnitTestCase::tearDown()
52 $tablesToTruncate = array(
55 $this->quickCleanup($tablesToTruncate, TRUE);
58 function testActivityCreateCustomBefore() {
59 $values = $this->callAPISuccess('custom_field', 'getoptions', array('field' => 'custom_group_id',));
60 $this->assertTrue($values['count'] == 0);
61 $this->CustomGroupCreate(array('extends' => 'Activity'));
62 $groupCount = $this->callAPISuccess('custom_group', 'getcount', array('extends' => 'activity'));
63 $this->assertEquals($groupCount, 1, 'one group should now exist');
64 $values = $this->callAPISuccess('custom_field', 'getoptions', array('field' => 'custom_group_id'));
65 $this->assertTrue($values['count'] == 1, 'check that cached value is not retained for custom_group_id');