$this->
getPaymentMethod(RefundPaymentHandlerInterface::
class),
$this->
getPaymentMethod(PreparedPaymentHandlerInterface::
class),
$this->
getPaymentMethod(RecurringPaymentHandlerInterface::
class),
];
$event =
new EntityLoadedEvent( new PaymentMethodDefinition(),
$paymentMethods,
Context::
createDefaultContext() );
$subscriber =
new PaymentHandlerIdentifierSubscriber();
$subscriber->
formatHandlerIdentifier($event);
/** @var array<PaymentMethodEntity> $methods */
$methods =
$event->
getEntities();
static::
assertContainsOnly(PaymentMethodEntity::
class,
$methods);
static::
assertCount(5,
$methods);
static::
assertSame('handler_shopware_synchronouspaymenthandlerinterface',
$methods[0
]->
getFormattedHandlerIdentifier());
static::
assertSame('handler_shopware_asynchronouspaymenthandlerinterface',
$methods[1
]->
getFormattedHandlerIdentifier());
static::
assertSame('handler_shopware_refundpaymenthandlerinterface',
$methods[2
]->
getFormattedHandlerIdentifier());