'name' => 'any-other-shipping-method-name',
'translated' =>
['name' => 'any-other-shipping-method-name'
],
]),
(new ShippingMethodEntity())->
assign([ 'id' => 'default-shipping-method-id',
'name' => 'default-shipping-method-name',
'translated' =>
['name' => 'default-shipping-method-name'
],
]),
]);
$this->salesChannelContext =
$this->
getSalesChannelContext();
$this->switcher =
new BlockedShippingMethodSwitcher( $this->
getShippingMethodRoute() );
} public function testSwitchDoesNotSwitchWithNoErrors(): void
{ $errorCollection =
$this->
getErrorCollection();
$newShippingMethod =
$this->switcher->
switch($errorCollection,
$this->salesChannelContext
);
static::
assertSame('original-shipping-method-id',
$newShippingMethod->
getId());