-
Notifications
You must be signed in to change notification settings - Fork 253
Move Сarrier Сodes validation to service layer #131 #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$errors[] = __('You can\'t configure "%field" because you have chosen Global Shipping configuration.', [ | ||
'field' => SourceInterface::CARRIER_LINKS | ||
]); | ||
} | ||
|
||
$availableCarriers = $this->shippingConfig->getAllCarriers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we should refactor this logic
Becuase if $carrierLinks
is not array then we do not need to perform foreach
try { | ||
$this->_webApiCall($serviceInfo, ['source' => $expectedData]); | ||
} catch (\Exception $e) { | ||
self::assertEquals(\Magento\Framework\Webapi\Exception::HTTP_BAD_REQUEST, $e->getCode()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, need to check all conditions (all error messages)
*/ | ||
private $shippingConfig; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed docktype for $shippingConfig
self::assertEquals(\Magento\Framework\Webapi\Exception::HTTP_BAD_REQUEST, $e->getCode()); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, need to fix the other api-functional builds
We do not run api-functional builds on Travis, so we need to run them on local machine
And now we have broken tests
L3 pr 20210908
Description