useTransaction(); $this->_params = array( 'name' => 'my product', ); } // function tearDown() { // $this->quickCleanup(array('civicrm_product'), TRUE); // } public function testGetFields() { $fields = $this->callAPISuccess($this->_entity, 'getfields', array('action' => 'create')); $this->assertArrayHasKey('period_type', $fields['values']); } public function testGetOptions() { $options = $this->callAPISuccess($this->_entity, 'getoptions', array('field' => 'period_type')); $this->assertArrayHasKey('rolling', $options['values']); } }