public function testPaymentRegistry(): void
{ $registry =
new PaymentHandlerRegistry( $this->
registerHandler(SynchronousPaymentHandlerInterface::
class),
$this->
registerHandler(AsynchronousPaymentHandlerInterface::
class),
$this->
registerHandler(PreparedPaymentHandlerInterface::
class),
$this->
registerHandler(RefundPaymentHandlerInterface::
class),
$this->
registerHandler(RecurringPaymentHandlerInterface::
class),
$this->connection,
);
$sync =
$registry->
getSyncPaymentHandler($this->ids->
get(SynchronousPaymentHandlerInterface::
class));
static::
assertInstanceOf(SynchronousPaymentHandlerInterface::
class,
$sync);
$async =
$registry->
getAsyncPaymentHandler($this->ids->
get(AsynchronousPaymentHandlerInterface::
class));
static::
assertInstanceOf(AsynchronousPaymentHandlerInterface::
class,
$async);
$prepared =
$registry->
getPreparedPaymentHandler($this->ids->
get(PreparedPaymentHandlerInterface::
class));
static::
assertInstanceOf(PreparedPaymentHandlerInterface::
class,
$prepared);
$refund =
$registry->
getRefundPaymentHandler($this->ids->
get(RefundPaymentHandlerInterface::
class));
static::
assertInstanceOf(RefundPaymentHandlerInterface::
class,
$refund);