1 | <?php |
||
11 | class RedirectContext extends RawRedirectContext |
||
12 | { |
||
13 | /** |
||
14 | * @param string $page |
||
15 | * Expected page URL. |
||
16 | * |
||
17 | * @throws \Exception |
||
18 | * @throws \OverflowException |
||
19 | * |
||
20 | * @Then /^(?:|I )should be redirected(?:| on "([^"]*)")$/ |
||
21 | */ |
||
22 | public function shouldBeRedirected($page = null) |
||
56 | |||
57 | /** |
||
58 | * @example |
||
59 | * Given user should have an access to the following pages |
||
60 | * | page/url | |
||
61 | * |
||
62 | * @param string $not |
||
63 | * @param TableNode $paths |
||
64 | * |
||
65 | * @throws \Exception |
||
66 | * |
||
67 | * @Given /^user should(| not) have an access to the following pages:$/ |
||
68 | */ |
||
69 | public function checkUserAccessToPages($not, TableNode $paths) |
||
88 | |||
89 | /** |
||
90 | * This step should be used instead of "I am at" if page should be checked |
||
91 | * for accessibility before visiting. |
||
92 | * |
||
93 | * Also, this step can be replaced by: |
||
94 | * Then I am at "page/url" |
||
95 | * |
||
96 | * @param string $path |
||
97 | * Path to visit. |
||
98 | * @param string|int $code |
||
99 | * Expected HTTP status code. |
||
100 | * |
||
101 | * @throws \Exception |
||
102 | * |
||
103 | * @Given /^I am on the "([^"]*)" page(?:| and HTTP code is "([^"]*)")$/ |
||
104 | * @Given /^(?:|I )visit the "([^"]*)" page(?:| and HTTP code is "([^"]*)")$/ |
||
105 | */ |
||
106 | public function visitPage($path, $code = 200) |
||
116 | } |
||
117 |