1 | <?php |
||
24 | final class ImpersonatingCustomersContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var ShowPageInterface |
||
28 | */ |
||
29 | private $customerShowPage; |
||
30 | |||
31 | /** |
||
32 | * @var DashboardPageInterface |
||
33 | */ |
||
34 | private $dashboardPage; |
||
35 | |||
36 | /** |
||
37 | * @var HomePageInterface |
||
38 | */ |
||
39 | private $homePage; |
||
40 | |||
41 | /** |
||
42 | * @param ShowPageInterface $customerShowPage |
||
43 | * @param DashboardPageInterface $dashboardPage |
||
44 | * @param HomePageInterface $homePage |
||
45 | */ |
||
46 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * @Given I am impersonating the customer :customer |
||
58 | */ |
||
59 | public function iAmImpersonatingCustomer(CustomerInterface $customer) |
||
65 | |||
66 | /** |
||
67 | * @When I visit the store |
||
68 | */ |
||
69 | public function iVisitTheStore() |
||
73 | |||
74 | /** |
||
75 | * @When I log out from the store |
||
76 | */ |
||
77 | public function iLogOut() |
||
81 | |||
82 | /** |
||
83 | * @When I log out from my admin account |
||
84 | */ |
||
85 | public function iLogOutFromMyAdminAccount() |
||
90 | |||
91 | /** |
||
92 | * @When I impersonate them |
||
93 | */ |
||
94 | public function iTryToImpersonateThem() |
||
98 | |||
99 | /** |
||
100 | * @Then I should be unable to impersonate them |
||
101 | */ |
||
102 | public function iShouldBeUnableToImpersonateThem() |
||
109 | |||
110 | /** |
||
111 | * @Then I should still be able to access the administration dashboard |
||
112 | */ |
||
113 | public function iShouldBeAbleToAccessAdministrationDashboard() |
||
117 | |||
118 | /** |
||
119 | * @Then I should be logged in as :fullName |
||
120 | */ |
||
121 | public function iShouldBeLoggedInAs($fullName) |
||
133 | |||
134 | /** |
||
135 | * @Then I should not be logged in as :fullName |
||
136 | */ |
||
137 | public function iShouldNotBeLoggedInAs($fullName) |
||
150 | |||
151 | /** |
||
152 | * @Then I should see that impersonating :email was successful |
||
153 | */ |
||
154 | public function iShouldSeeThatImpersonatingWasSuccessful($email) |
||
161 | } |
||
162 |