Skip to content

Commit

Permalink
Merge pull request Sylius#3953 from NeverResponse/province-filters-ga…
Browse files Browse the repository at this point in the history
…lore

[Addressing] Province rendering tweaks
  • Loading branch information
Paweł Jędrzejewski committed Jan 22, 2016
2 parents 69c6e99 + ddea6df commit 2cd4891
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Promotion/Checker/ShippingCountryRuleChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function isEligible(PromotionSubjectInterface $subject, array $configurat
return false;
}

$country = $this->countryRepository->findOneBy(array('code' => $address->getCountry()));
$country = $this->countryRepository->findOneBy(array('code' => $address->getCountryCode()));

if (!$country instanceof CountryInterface) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions spec/Promotion/Checker/ShippingCountryRuleCheckerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function it_should_recognize_subject_as_not_eligible_if_country_does_not_match(
RepositoryInterface $countryRepository
) {
$country->getCode()->willReturn('IE');
$address->getCountry()->willReturn('IE');
$address->getCountryCode()->willReturn('IE');
$subject->getShippingAddress()->willReturn($address);

$countryRepository->findOneBy(array('code' => 'IE'))->willReturn($country);
Expand All @@ -68,7 +68,7 @@ function it_should_recognize_subject_as_eligible_if_country_match(
RepositoryInterface $countryRepository
) {
$country->getCode()->willReturn('IE');
$address->getCountry()->willReturn('IE');
$address->getCountryCode()->willReturn('IE');
$subject->getShippingAddress()->willReturn($address);

$country->getId()->willReturn(1);
Expand Down

0 comments on commit 2cd4891

Please sign in to comment.