+--------------------------------------------------------------------+
*/
+use Civi\Test\Invasive;
+
/**
* Class CRM_Core_PaymentTest
* @group headless
$processor->setCancelUrl($cancel);
$processor->setSuccessUrl($success);
- // Using ReflectionUtils to access protected methods
- $successGetter = new ReflectionMethod($processor, 'getReturnSuccessUrl');
- $successGetter->setAccessible(TRUE);
- $this->assertEquals($success, $successGetter->invoke($processor, NULL));
-
- $cancelGetter = new ReflectionMethod($processor, 'getReturnFailUrl');
- $cancelGetter->setAccessible(TRUE);
- $this->assertEquals($cancel, $cancelGetter->invoke($processor, NULL));
+ $this->assertEquals($success, Invasive::call([$processor, 'getReturnSuccessUrl'], [NULL]));
+ $this->assertEquals($cancel, Invasive::call([$processor, 'getReturnFailUrl'], [NULL]));
}
}