1 | <?php |
||
21 | final class ManagingShippingCategoriesContext implements Context |
||
22 | { |
||
23 | /** @var ApiClientInterface */ |
||
24 | private $client; |
||
25 | |||
26 | public function __construct(ApiClientInterface $client) |
||
30 | |||
31 | /** |
||
32 | * @When I want to create a new shipping category |
||
33 | */ |
||
34 | public function iWantToCreateANewShippingCategory(): void |
||
38 | |||
39 | /** |
||
40 | * @When I want to modify a shipping category :shippingCategory |
||
41 | */ |
||
42 | public function iWantToModifyAShippingCategory(ShippingCategoryInterface $shippingCategory): void |
||
46 | |||
47 | /** |
||
48 | * @When I add it |
||
49 | * @When I try to add it |
||
50 | */ |
||
51 | public function iAddIt(): void |
||
55 | |||
56 | /** |
||
57 | * @When I delete shipping category :shippingCategory |
||
58 | */ |
||
59 | public function iDeleteShippingCategory(ShippingCategoryInterface $shippingCategory): void |
||
63 | |||
64 | /** |
||
65 | * @When I browse shipping categories |
||
66 | */ |
||
67 | public function iBrowseShippingCategories(): void |
||
71 | |||
72 | /** |
||
73 | * @When I do not specify its code |
||
74 | * @When I specify its code as :code |
||
75 | */ |
||
76 | public function iSpecifyItsCodeAs(?string $code = null): void |
||
82 | |||
83 | /** |
||
84 | * @When I name it :name |
||
85 | * @When I do not specify its name |
||
86 | * @When I rename it to :name |
||
87 | */ |
||
88 | public function iNameIt(?string $name = null): void |
||
94 | |||
95 | /** |
||
96 | * @When I modify a shipping category :shippingCategory |
||
97 | */ |
||
98 | public function iModifyAShippingCategory(ShippingCategoryInterface $shippingCategory): void |
||
102 | |||
103 | /** |
||
104 | * @When I specify its description as :description |
||
105 | */ |
||
106 | public function iSpecifyItsDescriptionAs(string $description): void |
||
110 | |||
111 | /** |
||
112 | * @When I save my changes |
||
113 | */ |
||
114 | public function iSaveMyChanges(): void |
||
118 | |||
119 | /** |
||
120 | * @Then I should be notified that shipping category with this code already exists |
||
121 | */ |
||
122 | public function iShouldBeNotifiedThatShippingCategoryWithThisCodeAlreadyExists(): void |
||
126 | |||
127 | /** |
||
128 | * @Then I should be notified that :element is required |
||
129 | */ |
||
130 | public function iShouldBeNotifiedThatElementIsRequired(string $element): void |
||
136 | |||
137 | /** |
||
138 | * @Then I should see a single shipping category in the list |
||
139 | * @Then I should see :count shipping categories in the list |
||
140 | */ |
||
141 | public function iShouldSeeShippingCategoriesInTheList(int $count = 1): void |
||
146 | |||
147 | /** |
||
148 | * @Then /^the (shipping category "([^"]+)") should be in the registry$/ |
||
149 | * @Then /^the (shipping category "([^"]+)") should appear in the registry$/ |
||
150 | */ |
||
151 | public function theShippingCategoryShouldAppearInTheRegistry(ShippingCategoryInterface $shippingCategory): void |
||
159 | |||
160 | /** |
||
161 | * @Then shipping category with name :name should not be added |
||
162 | */ |
||
163 | public function shippingCategoryWithNameShouldNotBeAdded(string $name): void |
||
170 | |||
171 | /** |
||
172 | * @Then /^(this shipping category) should no longer exist in the registry$/ |
||
173 | */ |
||
174 | public function thisShippingCategoryShouldNoLongerExistInTheRegistry( |
||
183 | |||
184 | /** |
||
185 | * @Then I should not be able to edit its code |
||
186 | */ |
||
187 | public function iShouldNotBeAbleToEditItsCode(): void |
||
197 | |||
198 | /** |
||
199 | * @Then there should still be only one shipping category with code :code |
||
200 | */ |
||
201 | public function thereShouldStillBeOnlyOneShippingCategoryWith(string $code): void |
||
206 | |||
207 | /** |
||
208 | * @Then this shipping category name should be :name |
||
209 | */ |
||
210 | public function thisShippingCategoryNameShouldBe(string $name): void |
||
217 | |||
218 | private function isItemOnIndex(string $property, string $value): bool |
||
224 | } |
||
225 |