1 | <?php |
||
14 | final class ManagingCustomBlocksContext implements Context |
||
15 | { |
||
16 | /** |
||
17 | * @var Session |
||
18 | */ |
||
19 | private $minkSession; |
||
20 | |||
21 | /** |
||
22 | * @var IndexPageInterface |
||
23 | */ |
||
24 | private $indexPage; |
||
25 | |||
26 | /** |
||
27 | * @var CreatePageInterface |
||
28 | */ |
||
29 | private $createPage; |
||
30 | |||
31 | /** |
||
32 | * @var UpdatePageInterface |
||
33 | */ |
||
34 | private $updatePage; |
||
35 | |||
36 | /** |
||
37 | * @var ShowPageInterface |
||
38 | */ |
||
39 | private $showPage; |
||
40 | |||
41 | /** |
||
42 | * @param Session $minkSession |
||
43 | * @param IndexPageInterface $indexPage |
||
44 | * @param CreatePageInterface $createPage |
||
45 | * @param UpdatePageInterface $updatePage |
||
46 | * @param ShowPageInterface $showPage |
||
47 | */ |
||
48 | public function __construct( |
||
61 | |||
62 | /** |
||
63 | * @Given I want to create a new custom block |
||
64 | * @Given I want to add a new custom block |
||
65 | */ |
||
66 | public function iWantToCreateNewCustomBlock() |
||
70 | |||
71 | /** |
||
72 | * @Given I browse custom blocks of the store |
||
73 | */ |
||
74 | public function iWantToBrowseCustomBlocksOfTheStore() |
||
78 | |||
79 | /** |
||
80 | * @Given I have created a custom block :name with image :imagePath |
||
81 | */ |
||
82 | public function iHaveCreatedCustomBlockWithImage($name, $imagePath) |
||
89 | |||
90 | /** |
||
91 | * @When I set its body to :body |
||
92 | */ |
||
93 | public function iSetItsBodyTo($body) |
||
97 | |||
98 | /** |
||
99 | * @When I set its link to :link |
||
100 | */ |
||
101 | public function iSetItsLinkTo($link) |
||
105 | |||
106 | /** |
||
107 | * @When I set its name to :name |
||
108 | */ |
||
109 | public function iSetItsNameTo($name) |
||
113 | |||
114 | /** |
||
115 | * @When I set its title to :title |
||
116 | */ |
||
117 | public function iSetItsTitleTo($title) |
||
121 | |||
122 | /** |
||
123 | * @When I attach :imagePath as its image |
||
124 | */ |
||
125 | public function iAttachAsItsImage($imagePath) |
||
129 | |||
130 | /** |
||
131 | * @When I add it |
||
132 | * @When I try to add it |
||
133 | */ |
||
134 | public function iAddIt() |
||
138 | |||
139 | /** |
||
140 | * @Then /^I should be notified that (body|name) is required$/ |
||
141 | */ |
||
142 | public function iShouldBeNotifiedThatElementIsRequired($element) |
||
149 | |||
150 | /** |
||
151 | * @Then the custom block :name should appear in the store |
||
152 | * @Then I should see the custom block :name in the list |
||
153 | */ |
||
154 | public function theCustomBlockShouldAppearInTheStore($name) |
||
162 | |||
163 | /** |
||
164 | * @Then I should see :amount custom blocks in the list |
||
165 | */ |
||
166 | public function iShouldSeeThatManyCustomBlocksInTheList($amount) |
||
174 | |||
175 | /** |
||
176 | * @Then the custom block :name should not be added |
||
177 | */ |
||
178 | public function theCustomBlockShouldNotBeAdded($name) |
||
186 | |||
187 | /** |
||
188 | * @When /^I preview (this custom block)$/ |
||
189 | * @When I preview custom block :customBlock |
||
190 | */ |
||
191 | public function iPreviewCustomBlock($customBlock) |
||
195 | |||
196 | /** |
||
197 | * @Given /^I want to edit (this custom block)$/ |
||
198 | */ |
||
199 | public function iWantToEditThisCustomBlock(CustomBlock $customBlock) |
||
203 | |||
204 | /** |
||
205 | * @When I change its body to :body |
||
206 | */ |
||
207 | public function iChangeItsBodyTo($body) |
||
211 | |||
212 | /** |
||
213 | * @When I change its link to :link |
||
214 | */ |
||
215 | public function iChangeItsLinkTo($link) |
||
219 | |||
220 | /** |
||
221 | * @When I change its title to :title |
||
222 | */ |
||
223 | public function iChangeItsTitleTo($title) |
||
227 | |||
228 | /** |
||
229 | * @When I save my changes |
||
230 | * @When I try to save my changes |
||
231 | */ |
||
232 | public function iSaveMyChanges() |
||
236 | |||
237 | /** |
||
238 | * @When I delete custom block :name |
||
239 | */ |
||
240 | public function iDeleteCustomBlock($name) |
||
245 | |||
246 | /** |
||
247 | * @Then I should see :expected in this block contents |
||
248 | */ |
||
249 | public function iShouldSeeInThisBlockContents($expected) |
||
253 | |||
254 | /** |
||
255 | * @Then I should see an image |
||
256 | */ |
||
257 | public function iShouldSeeImage() |
||
262 | |||
263 | /** |
||
264 | * @Then /^(this custom block) should have body "([^"]+)"$/ |
||
265 | */ |
||
266 | public function thisCustomBlockShouldHaveBody(CustomBlock $customBlock, $body) |
||
272 | |||
273 | /** |
||
274 | * @Then /^(this custom block) should have link "([^"]+)"$/ |
||
275 | */ |
||
276 | public function thisCustomBlockShouldHaveLink(CustomBlock $customBlock, $link) |
||
282 | |||
283 | /** |
||
284 | * @Then /^(this custom block) should have title "([^"]+)"$/ |
||
285 | */ |
||
286 | public function thisCustomBlockShouldHaveTitle(CustomBlock $customBlock, $title) |
||
292 | |||
293 | /** |
||
294 | * @Then the custom block :name should no longer exist in the store |
||
295 | */ |
||
296 | public function theCustomBlockShouldNoLongerExistInTheStore($name) |
||
300 | } |
||
301 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.