Skip to content
Snippets Groups Projects
Commit 1ff94318 authored by Rich's avatar Rich Committed by mattwire
Browse files

Add several tests

parent f3be3924
No related branches found
No related tags found
1 merge request!1526.6 to master
......@@ -180,12 +180,11 @@ class CRM_Stripe_BaseTest extends \PHPUnit\Framework\TestCase implements Headles
public function assertValidTrxn() {
$this->assertNotEmpty($this->trxn_id, "A trxn id was assigned");
// @todo Consider mock this, though currently only used by Direct Test, so maybe not.
$processor = new CRM_Core_Payment_Stripe('', civicrm_api3('PaymentProcessor', 'getsingle', ['id' => $this->paymentProcessorID]));
$processor = \Civi\Payment\System::singleton()->getById($this->paymentProcessorID);
$processor->setAPIParams();
try {
$results = \Stripe\Charge::retrieve(["id" => $this->trxn_id]);
$results = $processor->stripeClient->charges->retrieve(["id" => $this->trxn_id]);
$found = TRUE;
}
catch (Stripe_Error $e) {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment