$this->order->setPriceSetID($this->getPriceSetID());
}
else {
- CRM_Core_Error::deprecatedFunctionWarning('forms require a price set it');
+ CRM_Core_Error::deprecatedFunctionWarning('forms require a price set ID');
}
$this->_priceSet = $this->get('priceSet');
use Civi\Api4\MembershipBlock;
use Civi\Api4\PriceField;
use Civi\Api4\PriceSet;
+use Civi\Api4\PriceSetEntity;
/**
* Test APIv3 civicrm_contribute_* functions
'receipt_from_name' => 'Ego Freud',
];
+ $_REQUEST['id'] = $this->callAPISuccess('ContributionPage', 'create', $params)['id'];
+ PriceSetEntity::create(FALSE)->setValues(['entity_id' => $_REQUEST['id'], 'entity_table' => 'civicrm_contribution_page', 'price_set_id:name' => 'default_contribution_amount'])->execute();
// Execute CRM_Contribute_Form_ContributionBase preProcess (via child class).
// Check the assignment of payment processors.
/* @var \CRM_Contribute_Form_Contribution_Main $form */
$form = $this->getFormObject('CRM_Contribute_Form_Contribution_Main', ['payment_processor_id' => 0]);
- $_REQUEST['id'] = $this->callAPISuccess('ContributionPage', 'create', $params)['id'];
$form->preProcess();
$this->assertEquals('pay_later', $form->_paymentProcessor['name']);