1 | <?php |
||
24 | final class ManagingCustomerGroupsContext implements Context |
||
25 | { |
||
26 | /** @var CreatePageInterface */ |
||
27 | private $createPage; |
||
28 | |||
29 | /** @var IndexPageInterface */ |
||
30 | private $indexPage; |
||
31 | |||
32 | /** @var CurrentPageResolverInterface */ |
||
33 | private $currentPageResolver; |
||
34 | |||
35 | /** @var UpdatePageInterface */ |
||
36 | private $updatePage; |
||
37 | |||
38 | public function __construct( |
||
49 | |||
50 | /** |
||
51 | * @Given I want to create a new customer group |
||
52 | */ |
||
53 | public function iWantToCreateANewCustomerGroup() |
||
57 | |||
58 | /** |
||
59 | * @When I specify its code as :code |
||
60 | * @When I do not specify its code |
||
61 | */ |
||
62 | public function iSpecifyItsCodeAs($code = null) |
||
66 | |||
67 | /** |
||
68 | * @When I specify its name as :name |
||
69 | * @When I remove its name |
||
70 | */ |
||
71 | public function iSpecifyItsNameAs($name = null) |
||
75 | |||
76 | /** |
||
77 | * @When I add it |
||
78 | * @When I try to add it |
||
79 | */ |
||
80 | public function iAddIt() |
||
84 | |||
85 | /** |
||
86 | * @Then the customer group :customerGroup should appear in the store |
||
87 | */ |
||
88 | public function theCustomerGroupShouldAppearInTheStore(CustomerGroupInterface $customerGroup) |
||
94 | |||
95 | /** |
||
96 | * @When /^I want to edit (this customer group)$/ |
||
97 | */ |
||
98 | public function iWantToEditThisCustomerGroup(CustomerGroupInterface $customerGroup) |
||
102 | |||
103 | /** |
||
104 | * @When I save my changes |
||
105 | * @When I try to save my changes |
||
106 | */ |
||
107 | public function iSaveMyChanges() |
||
111 | |||
112 | /** |
||
113 | * @When I check (also) the :customerGroupName customer group |
||
114 | */ |
||
115 | public function iCheckTheCustomerGroup(string $customerGroupName): void |
||
119 | |||
120 | /** |
||
121 | * @When I delete them |
||
122 | */ |
||
123 | public function iDeleteThem(): void |
||
127 | |||
128 | /** |
||
129 | * @Then this customer group with name :name should appear in the store |
||
130 | * @Then I should see the customer group :name in the list |
||
131 | */ |
||
132 | public function thisCustomerGroupWithNameShouldAppearInTheStore($name) |
||
138 | |||
139 | /** |
||
140 | * @When I browse customer groups |
||
141 | * @When I want to browse customer groups |
||
142 | */ |
||
143 | public function iWantToBrowseCustomerGroups() |
||
147 | |||
148 | /** |
||
149 | * @Then I should see a single customer group in the list |
||
150 | * @Then I should see :amountOfCustomerGroups customer groups in the list |
||
151 | */ |
||
152 | public function iShouldSeeCustomerGroupsInTheList(int $amountOfCustomerGroups = 1): void |
||
158 | |||
159 | /** |
||
160 | * @Then /^(this customer group) should still be named "([^"]+)"$/ |
||
161 | */ |
||
162 | public function thisCustomerGroupShouldStillBeNamed(CustomerGroupInterface $customerGroup, $customerGroupName) |
||
168 | |||
169 | /** |
||
170 | * @Then I should be notified that name is required |
||
171 | */ |
||
172 | public function iShouldBeNotifiedThatNameIsRequired() |
||
179 | |||
180 | /** |
||
181 | * @Then I should be notified that customer group with this code already exists |
||
182 | */ |
||
183 | public function iShouldBeNotifiedThatCustomerGroupWithThisCodeAlreadyExists() |
||
187 | |||
188 | /** |
||
189 | * @Then I should be informed that this form contains errors |
||
190 | */ |
||
191 | public function iShouldBeInformedThatThisFormContainsErrors() |
||
198 | |||
199 | /** |
||
200 | * @Then I should not be able to edit its code |
||
201 | */ |
||
202 | public function iShouldNotBeAbleToEditItsCode(): void |
||
203 | { |
||
204 | Assert::true($this->updatePage->isCodeDisabled()); |
||
205 | } |
||
206 | |||
207 | /** |
||
208 | * @When I delete the :customerGroup customer group |
||
209 | */ |
||
210 | public function iDeleteTheCustomerGroup(CustomerGroupInterface $customerGroup) |
||
216 | |||
217 | /** |
||
218 | * @Then /^(this customer group) should no longer exist in the registry$/ |
||
219 | */ |
||
220 | public function thisCustomerGroupShouldNoLongerExistInTheRegistry(CustomerGroupInterface $customerGroup) |
||
230 | } |
||
231 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.