1 | <?php |
||
13 | final class ManagingStringBlocksContext implements Context |
||
14 | { |
||
15 | /** |
||
16 | * @var IndexPageInterface |
||
17 | */ |
||
18 | private $indexPage; |
||
19 | |||
20 | /** |
||
21 | * @var CreatePageInterface |
||
22 | */ |
||
23 | private $createPage; |
||
24 | |||
25 | /** |
||
26 | * @var UpdatePageInterface |
||
27 | */ |
||
28 | private $updatePage; |
||
29 | |||
30 | /** |
||
31 | * @var ShowPageInterface |
||
32 | */ |
||
33 | private $showPage; |
||
34 | |||
35 | /** |
||
36 | * @param IndexPageInterface $indexPage |
||
37 | * @param CreatePageInterface $createPage |
||
38 | * @param UpdatePageInterface $updatePage |
||
39 | * @param ShowPageInterface $showPage |
||
40 | */ |
||
41 | public function __construct( |
||
52 | |||
53 | /** |
||
54 | * @Given I want to create a new string block |
||
55 | * @Given I want to add a new string block |
||
56 | */ |
||
57 | public function iWantToCreateNewStringBlock() |
||
61 | |||
62 | /** |
||
63 | * @Given I browse string blocks of the store |
||
64 | */ |
||
65 | public function iWantToBrowseStringBlocksOfTheStore() |
||
69 | |||
70 | /** |
||
71 | * @When I set its name to :name |
||
72 | */ |
||
73 | public function iSetItsNameTo($name) |
||
77 | |||
78 | /** |
||
79 | * @When I set its body to :body |
||
80 | */ |
||
81 | public function iSetItsBodyTo($body) |
||
85 | |||
86 | /** |
||
87 | * @When I add it |
||
88 | * @When I try to add it |
||
89 | */ |
||
90 | public function iAddIt() |
||
94 | |||
95 | /** |
||
96 | * @Then /^I should be notified that (body|name) is required$/ |
||
97 | */ |
||
98 | public function iShouldBeNotifiedThatElementIsRequired($element) |
||
105 | |||
106 | /** |
||
107 | * @Then the string block :name should appear in the store |
||
108 | * @Then I should see the string block :name in the list |
||
109 | */ |
||
110 | public function theStringBlockShouldAppearInTheStore($name) |
||
118 | |||
119 | /** |
||
120 | * @Then I should see :amount string blocks in the list |
||
121 | */ |
||
122 | public function iShouldSeeThatManyStringBlocksInTheList($amount) |
||
130 | |||
131 | /** |
||
132 | * @Then the string block :name should not be added |
||
133 | */ |
||
134 | public function theStringBlockShouldNotBeAdded($name) |
||
142 | |||
143 | /** |
||
144 | * @Given /^I want to edit (this string block)$/ |
||
145 | */ |
||
146 | public function iWantToEditThisStringBlock(StringBlock $staticContent) |
||
150 | |||
151 | /** |
||
152 | * @When /^I preview (this string block)$/ |
||
153 | */ |
||
154 | public function iPreviewStringBlock(StringBlock $stringBlock) |
||
158 | |||
159 | /** |
||
160 | * @When I change its body to :body |
||
161 | */ |
||
162 | public function iChangeItsBodyTo($body) |
||
166 | |||
167 | /** |
||
168 | * @When I save my changes |
||
169 | * @When I try to save my changes |
||
170 | */ |
||
171 | public function iSaveMyChanges() |
||
175 | |||
176 | /** |
||
177 | * @When I delete string block :name |
||
178 | */ |
||
179 | public function iDeleteStringBlock($name) |
||
184 | |||
185 | /** |
||
186 | * @Then I should see :expected in this block contents |
||
187 | */ |
||
188 | public function iShouldSeeInThisBlockContents($expected) |
||
192 | |||
193 | /** |
||
194 | * @Then /^(this string block) should have body "([^"]+)"$/ |
||
195 | */ |
||
196 | public function thisStringBlockShouldHaveBody(StringBlock $staticContent, $body) |
||
202 | |||
203 | /** |
||
204 | * @Then the string block :name should no longer exist in the store |
||
205 | */ |
||
206 | public function theStringBlockShouldNoLongerExistInTheStore($name) |
||
210 | } |
||
211 |