-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Bug Fix] ShippingCountryRuleChecker, Use the country configuration as a code, instead of it's id #5332
[Bug Fix] ShippingCountryRuleChecker, Use the country configuration as a code, instead of it's id #5332
Conversation
@@ -56,9 +56,8 @@ function it_should_recognize_subject_as_not_eligible_if_country_does_not_match( | |||
$subject->getShippingAddress()->willReturn($address); | |||
|
|||
$countryRepository->findOneBy(['code' => 'IE'])->willReturn($country); | |||
$country->getId()->willReturn(2); |
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.
It should be replaced by $country->getCode()->willReturn...
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.
maybe im stupid, but isnt this already at the top of this method? See: https://github.com/steffenbrem/Sylius/blob/dd619f287d67a3162709f2c2698c3785ff963c32/src/Sylius/Component/Core/spec/Promotion/Checker/ShippingCountryRuleCheckerSpec.php#L69
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.
@Zales0123 Could you confirm?
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.
Sure, didn't notice that 👍 😄
I just spotted this in promotions this morning, good job for fixing 👍 |
dd619f2
to
c062c94
Compare
This one is rebased on latest master and ready too. |
Thanks! |
…-shipping-country-code-fix [Bug Fix] ShippingCountryRuleChecker, Use the country configuration as a code, instead of it's id
This promotion rule is currently broken and ignored when used.