1 | <?php |
||
24 | final class ProductReviewContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var CreatePageInterface |
||
28 | */ |
||
29 | private $createPage; |
||
30 | |||
31 | /** |
||
32 | * @var NotificationCheckerInterface |
||
33 | */ |
||
34 | private $notificationChecker; |
||
35 | |||
36 | /** |
||
37 | * @param CreatePageInterface $createPage |
||
38 | * @param NotificationCheckerInterface $notificationChecker |
||
39 | */ |
||
40 | public function __construct( |
||
47 | |||
48 | /** |
||
49 | * @Given I want to review product :product |
||
50 | */ |
||
51 | public function iWantToReviewProduct(ProductInterface $product) |
||
55 | |||
56 | /** |
||
57 | * @When I leave a comment :comment as :author |
||
58 | * @When I leave a comment :comment, titled :title |
||
59 | * @When I leave a comment :comment, titled :title as :author |
||
60 | * @When I leave a review titled :title as :author |
||
61 | */ |
||
62 | public function iLeaveACommentTitled($comment = null, $title = null, $author = null) |
||
71 | |||
72 | /** |
||
73 | * @When I title it with very long title |
||
74 | */ |
||
75 | public function iTitleItWithVeryLongTitle() |
||
79 | |||
80 | /** |
||
81 | * @When I rate it with :rate point(s) |
||
82 | */ |
||
83 | public function iRateItWithPoints($rate) |
||
87 | |||
88 | /** |
||
89 | * @When I do not rate it |
||
90 | */ |
||
91 | public function iDoNotRateIt() |
||
95 | |||
96 | /** |
||
97 | * @When I add it |
||
98 | */ |
||
99 | public function iAddIt() |
||
103 | |||
104 | /** |
||
105 | * @Then I should be notified that my review is waiting for the acceptation |
||
106 | */ |
||
107 | public function iShouldBeNotifiedThatMyReviewIsWaitingForTheAcceptation() |
||
114 | |||
115 | /** |
||
116 | * @Then I should be notified that I must check review rating |
||
117 | */ |
||
118 | public function iShouldBeNotifiedThatIMustCheckReviewRating() |
||
126 | |||
127 | /** |
||
128 | * @Then I should be notified that title is required |
||
129 | */ |
||
130 | public function iShouldBeNotifiedThatTitleIsRequired() |
||
138 | |||
139 | /** |
||
140 | * @Then I should be notified that title must have at least 2 characters |
||
141 | */ |
||
142 | public function iShouldBeNotifiedThatTitleMustHaveAtLeast2Characters() |
||
150 | |||
151 | /** |
||
152 | * @Then I should be notified that title must have at most 255 characters |
||
153 | */ |
||
154 | public function iShouldBeNotifiedThatTitleMustHaveAtMost255Characters() |
||
162 | |||
163 | /** |
||
164 | * @Then I should be notified that comment is required |
||
165 | */ |
||
166 | public function iShouldBeNotifiedThatCommentIsRequired() |
||
174 | |||
175 | /** |
||
176 | * @Then I should be notified that I must enter my email |
||
177 | */ |
||
178 | public function iShouldBeNotifiedThatIMustEnterMyEmail() |
||
186 | |||
187 | /** |
||
188 | * @Then I should be notified that this email is already registered |
||
189 | */ |
||
190 | public function iShouldBeNotifiedThatThisEmailIsAlreadyRegistered() |
||
198 | |||
199 | /** |
||
200 | * @return string |
||
201 | */ |
||
202 | private function getVeryLongTitle() |
||
206 | } |
||
207 |