Exemplo n.º 1
0
 /**
  *  Test Contribution Import.
  */
 public function testProcessContribution()
 {
     $this->offsetDefaultPriceSet();
     $form = new CRM_Batch_Form_Entry();
     $params = $this->getContributionData();
     $this->assertTrue($form->testProcessContribution($params));
     $result = $this->callAPISuccess('contribution', 'get', array('return' => 'total_amount'));
     $this->assertEquals(2, $result['count']);
     foreach ($result['values'] as $contribution) {
         $this->assertEquals($this->callAPISuccess('line_item', 'getvalue', array('contribution_id' => $contribution['id'], 'return' => 'line_total')), $contribution['total_amount']);
     }
 }