예제 #1
0
 /**
  * @Given /^there is a zone "The Rest of the World" containing all other countries$/
  */
 public function thereIsAZoneTheRestOfTheWorldContainingAllOtherCountries()
 {
     $restOfWorldCountries = array_diff(array_keys(Intl::getRegionBundle()->getCountryNames('en')), array_merge($this->euMembers, ['US']));
     $zone = $this->zoneFactory->createWithMembers($restOfWorldCountries);
     $zone->setType(ZoneInterface::TYPE_COUNTRY);
     $zone->setCode('RoW');
     $zone->setName('The Rest of the World');
     $this->zoneRepository->add($zone);
 }
예제 #2
0
 /**
  * @Given the store has a zone :zoneName with code :code
  * @Given the store also has a zone :zoneName with code :code
  */
 public function theStoreHasAZoneWithCode($zoneName, $code)
 {
     $zone = $this->zoneFactory->createTyped(ZoneInterface::TYPE_ZONE);
     $zone->setCode($code);
     $zone->setName($zoneName);
     $this->sharedStorage->set('zone', $zone);
     $this->zoneRepository->add($zone);
 }