quickCleanup($tablesToTruncate, TRUE); } function testActivityCreateCustomBefore() { $values = $this->callAPISuccess('custom_field', 'getoptions', array('field' => 'custom_group_id',)); $this->assertTrue($values['count'] == 0); $this->CustomGroupCreate(array('extends' => 'Activity')); $groupCount = $this->callAPISuccess('custom_group', 'getcount', array('extends' => 'activity')); $this->assertEquals($groupCount, 1, 'one group should now exist'); $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'); } }