'translated' =>
['name' => 'any-other-payment-method-name'
],
]),
(new PaymentMethodEntity())->
assign([ 'id' => 'default-payment-method-id',
'name' => 'default-payment-method-name',
'translated' =>
['name' => 'default-payment-method-name'
],
]),
]);
$this->salesChannelContext =
$this->
getSalesChannelContext();
$this->switcher =
new BlockedPaymentMethodSwitcher( $this->
getPaymentMethodRoute() );
} public function testSwitchDoesNotSwitchWithNoErrors(): void
{ $errorCollection =
$this->
getErrorCollection();
$newPaymentMethod =
$this->switcher->
switch($errorCollection,
$this->salesChannelContext
);
static::
assertSame('original-payment-method-id',
$newPaymentMethod->
getId());
// Assert notices