1 | <?php |
||
25 | final class ManagingProductAssociationTypesContext implements Context |
||
26 | { |
||
27 | /** |
||
28 | * @var CreatePageInterface |
||
29 | */ |
||
30 | private $createPage; |
||
31 | |||
32 | /** |
||
33 | * @var IndexPageInterface |
||
34 | */ |
||
35 | private $indexPage; |
||
36 | |||
37 | /** |
||
38 | * @var UpdatePageInterface |
||
39 | */ |
||
40 | private $updatePage; |
||
41 | |||
42 | /** |
||
43 | * @var CurrentPageResolverInterface |
||
44 | */ |
||
45 | private $currentPageResolver; |
||
46 | |||
47 | /** |
||
48 | * @param CreatePageInterface $createPage |
||
49 | * @param IndexPageInterface $indexPage |
||
50 | * @param UpdatePageInterface $updatePage |
||
51 | * @param CurrentPageResolverInterface $currentPageResolver |
||
52 | */ |
||
53 | public function __construct( |
||
64 | |||
65 | /** |
||
66 | * @When I want to browse product association types |
||
67 | */ |
||
68 | public function iWantToBrowseProductAssociationTypes() |
||
72 | |||
73 | /** |
||
74 | * @When I want to create a new product association type |
||
75 | */ |
||
76 | public function iWantToCreateANewProductAssociationType() |
||
80 | |||
81 | /** |
||
82 | * @When I want to modify the :productAssociationType product association type |
||
83 | */ |
||
84 | public function iWantToModifyAPaymentMethod(AssociationTypeInterface $productAssociationType) |
||
88 | |||
89 | /** |
||
90 | * @When I specify its name as :name |
||
91 | * @When I do not name it |
||
92 | */ |
||
93 | public function iSpecifyItsNameAs($name = null) |
||
97 | |||
98 | /** |
||
99 | * @When I rename it to :name |
||
100 | * @When I remove its name |
||
101 | */ |
||
102 | public function iRenameItTo($name = null) |
||
106 | |||
107 | /** |
||
108 | * @When I specify its code as :code |
||
109 | * @When I do not specify its code |
||
110 | */ |
||
111 | public function iSpecifyItsCodeAs($code = null) |
||
115 | |||
116 | /** |
||
117 | * @When I add it |
||
118 | * @When I try to add it |
||
119 | */ |
||
120 | public function iAddIt() |
||
124 | |||
125 | /** |
||
126 | * @When I save my changes |
||
127 | * @When I try to save my changes |
||
128 | */ |
||
129 | public function iSaveMyChanges() |
||
133 | |||
134 | /** |
||
135 | * @When I delete the :productAssociationType product association type |
||
136 | */ |
||
137 | public function iDeleteTheProductAssociationType(AssociationTypeInterface $productAssociationType) |
||
146 | |||
147 | /** |
||
148 | * @Then I should see :amount product association types in the list |
||
149 | */ |
||
150 | public function iShouldSeeCustomerGroupsInTheList($amount) |
||
158 | |||
159 | /** |
||
160 | * @Then I should see the product association type :name in the list |
||
161 | * |
||
162 | */ |
||
163 | public function iShouldSeeTheProductAssociationTypeInTheList($name) |
||
172 | |||
173 | /** |
||
174 | * @Then the product association type :productAssociationType should appear in the store |
||
175 | */ |
||
176 | public function theProductAssociationTypeShouldAppearInTheStore(AssociationTypeInterface $productAssociationType) |
||
188 | |||
189 | /** |
||
190 | * @Then /^(this product association type) name should be "([^"]+)"$/ |
||
191 | * @Then /^(this product association type) should still be named "([^"]+)"$/ |
||
192 | */ |
||
193 | public function thisProductAssociationTypeNameShouldBe( |
||
209 | |||
210 | /** |
||
211 | * @Then the code field should be disabled |
||
212 | */ |
||
213 | public function theCodeFieldShouldBeDisabled() |
||
220 | |||
221 | /** |
||
222 | * @Then /^(this product association type) should no longer exist in the registry$/ |
||
223 | */ |
||
224 | public function thisProductAssociationTypeShouldNoLongerExistInTheRegistry( |
||
238 | |||
239 | /** |
||
240 | * @Then I should be notified that product association type with this code already exists |
||
241 | */ |
||
242 | public function iShouldBeNotifiedThatProductAssociationTypeWithThisCodeAlreadyExists() |
||
249 | |||
250 | /** |
||
251 | * @Then there should still be only one product association type with a :element :code |
||
252 | */ |
||
253 | public function thereShouldStillBeOnlyOneProductAssociationTypeWith($element, $code) |
||
262 | |||
263 | /** |
||
264 | * @Then I should be notified that :element is required |
||
265 | */ |
||
266 | public function iShouldBeNotifiedThatIsRequired($element) |
||
273 | |||
274 | /** |
||
275 | * @Then the product association type with :element :value should not be added |
||
276 | */ |
||
277 | public function theProductAssociationTypeWithElementValueShouldNotBeAdded($element, $value) |
||
286 | |||
287 | /** |
||
288 | * @param string $element |
||
289 | * @param string $expectedMessage |
||
290 | */ |
||
291 | private function assertFieldValidationMessage($element, $expectedMessage) |
||
298 | } |
||
299 |