1 | <?php |
||
24 | final class ZoneContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $euMembers = [ |
||
30 | 'BE', 'BG', 'CZ', 'DK', 'DE', 'EE', 'IE', 'GR', 'ES', |
||
31 | 'FR', 'IT', 'CY', 'LV', 'LT', 'LU', 'HU', 'MT', 'NL', |
||
32 | 'AT', 'PL', 'PT', 'RO', 'SI', 'SK', 'FI', 'SE', 'GB', |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * @var RepositoryInterface |
||
37 | */ |
||
38 | private $zoneRepository; |
||
39 | |||
40 | /** |
||
41 | * @var SettingsManagerInterface |
||
42 | */ |
||
43 | private $settingsManager; |
||
44 | |||
45 | /** |
||
46 | * @var ZoneFactoryInterface |
||
47 | */ |
||
48 | private $zoneFactory; |
||
49 | |||
50 | /** |
||
51 | * @param RepositoryInterface $zoneRepository |
||
52 | * @param SettingsManagerInterface $settingsManager |
||
53 | * @param ZoneFactoryInterface $zoneFactory |
||
54 | */ |
||
55 | public function __construct( |
||
64 | |||
65 | /** |
||
66 | * @Transform :zone zone |
||
67 | * @Transform zone :zone |
||
68 | * @Transform :zone |
||
69 | */ |
||
70 | public function getZoneByCode($zone) |
||
79 | |||
80 | /** |
||
81 | * @Transform /^rest of the world$/ |
||
82 | * @Transform /^the rest of the world$/ |
||
83 | */ |
||
84 | public function getRestOfTheWorldZone() |
||
93 | |||
94 | /** |
||
95 | * @Given /^there is "EU" zone containing all members of European Union$/ |
||
96 | */ |
||
97 | public function thereIsEUZoneContainingAllMembersOfEuropeanUnion() |
||
106 | |||
107 | /** |
||
108 | * @Given /^there is rest of the world zone containing all other countries$/ |
||
109 | */ |
||
110 | public function thereIsRestOfTheWorldZoneContainingAllOtherCountries() |
||
124 | |||
125 | /** |
||
126 | * @Given default tax zone is :taxZone |
||
127 | */ |
||
128 | public function defaultTaxZoneIs($taxZone) |
||
136 | } |
||
137 |