'Product Tests', 'description' => 'Test product API', 'group' => 'CiviCRM API Tests', ); } function setUp() { $this->_params = array( 'name' => 'my product', ); } function tearDown() { $this->quickCleanup(array('civicrm_product'), TRUE); } function testGetFields() { $fields = $this->callAPISuccess($this->_entity, 'getfields', array('action' => 'create')); $this->assertArrayHasKey('period_type', $fields['values']); } function testGetOptions() { $options = $this->callAPISuccess($this->_entity, 'getoptions', array('field' => 'period_type')); $this->assertArrayHasKey('rolling', $options['values']); } }