1 | <?php |
||
23 | final class PromotionContext implements Context |
||
24 | { |
||
25 | /** |
||
26 | * @var SharedStorageInterface |
||
27 | */ |
||
28 | private $sharedStorage; |
||
29 | |||
30 | /** |
||
31 | * @var PromotionRepositoryInterface |
||
32 | */ |
||
33 | private $promotionRepository; |
||
34 | |||
35 | /** |
||
36 | * @param SharedStorageInterface $sharedStorage |
||
37 | * @param PromotionRepositoryInterface $promotionRepository |
||
38 | */ |
||
39 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | * @When /^I try to delete a ("([^"]+)" promotion)$/ |
||
49 | */ |
||
50 | public function iTryToDeletePromotion(PromotionInterface $promotion) |
||
60 | |||
61 | /** |
||
62 | * @When /^I delete a ("([^"]+)" promotion)$/ |
||
63 | */ |
||
64 | public function iDeletePromotion(PromotionInterface $promotion) |
||
69 | |||
70 | /** |
||
71 | * @Then /^(this promotion) should no longer exist in the promotion registry$/ |
||
72 | */ |
||
73 | public function promotionShouldNotExistInTheRegistry(PromotionInterface $promotion) |
||
77 | |||
78 | /** |
||
79 | * @Then promotion :promotion should still exist in the registry |
||
80 | */ |
||
81 | public function promotionShouldStillExistInTheRegistry(PromotionInterface $promotion) |
||
85 | |||
86 | /** |
||
87 | * @Then I should be notified that it is in use and cannot be deleted |
||
88 | */ |
||
89 | public function iShouldBeNotifiedOfFailure() |
||
95 | |||
96 | /** |
||
97 | * @Then I should be notified that it has been successfully deleted |
||
98 | */ |
||
99 | public function iShouldBeNotifiedOfSuccess() |
||
103 | |||
104 | /** |
||
105 | * @Given I am logged in as an administrator |
||
106 | */ |
||
107 | public function iAmLoggedInAsAnAdministrator() |
||
111 | } |
||
112 |