function it_should_recognize_subject_as_eligible_if_country_match(OrderInterface $subject, AddressInterface $address, CountryInterface $country, RepositoryInterface $countryRepository)
 {
     $country->getCode()->willReturn('IE');
     $address->getCountry()->willReturn('IE');
     $subject->getShippingAddress()->willReturn($address);
     $country->getId()->willReturn(1);
     $countryRepository->findOneBy(array('code' => 'IE'))->willReturn($country);
     $this->isEligible($subject, array('country' => 1))->shouldReturn(true);
 }
 /**
  * @When /^I want to create a new province in (country "([^"]*)")$/
  */
 public function iWantToCreateANewProvinceInCountry(CountryInterface $country)
 {
     $this->updatePage->open(['id' => $country->getId()]);
     $this->updatePage->clickAddProvinceButton();
 }
 function it_opens_country_update_page(UpdatePageInterface $countryUpdatePage, CountryInterface $country)
 {
     $country->getId()->willReturn(10);
     $countryUpdatePage->open(['id' => 10])->shouldBeCalled();
     $this->iWantToEditThisCountry($country);
 }
 /**
  * @Given /^I want to edit (this country)$/
  */
 public function iWantToEditThisCountry(CountryInterface $country)
 {
     $this->countryUpdatePage->open(['id' => $country->getId()]);
 }