1 | <?php |
||
24 | final class ProductContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var ShowPageInterface |
||
28 | */ |
||
29 | private $showPage; |
||
30 | |||
31 | /** |
||
32 | * @param ShowPageInterface $showPage |
||
33 | */ |
||
34 | public function __construct(ShowPageInterface $showPage) |
||
38 | |||
39 | /** |
||
40 | * @Then I should be able to access product :product |
||
41 | */ |
||
42 | public function iShouldBeAbleToAccessProduct(ProductInterface $product) |
||
51 | |||
52 | /** |
||
53 | * @Then I should not be able to access product :product |
||
54 | */ |
||
55 | public function iShouldNotBeAbleToAccessProduct(ProductInterface $product) |
||
64 | |||
65 | /** |
||
66 | * @When /^I check (this product)'s details/ |
||
67 | */ |
||
68 | public function iOpenProductPage(ProductInterface $product) |
||
72 | |||
73 | /** |
||
74 | * @Given I should see the product name :name |
||
75 | */ |
||
76 | public function iShouldSeeProductName($name) |
||
84 | |||
85 | /** |
||
86 | * @When I open page :url |
||
87 | */ |
||
88 | public function iOpenPage($url) |
||
92 | |||
93 | /** |
||
94 | * @Then I should be on :product product detailed page |
||
95 | */ |
||
96 | public function iShouldBeOnProductDetailedPage(ProductInterface $product) |
||
103 | |||
104 | /** |
||
105 | * @Then I should see the product attribute :attributeName with value :AttributeValue |
||
106 | */ |
||
107 | public function iShouldSeeTheProductAttributeWithValue($attributeName, $AttributeValue) |
||
114 | } |
||
115 |