[Behat] Add creation of zones in zone setup context

This commit is contained in:
Arminek 2016-03-31 13:33:58 +02:00
parent 2c60a25654
commit f7d5a00315

View file

@ -114,4 +114,16 @@ final class ZoneContext implements Context
$this->zoneRepository->remove($zone);
}
}
/**
* @Given the store 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->zoneRepository->add($zone);
}
}