1 | <?php |
||
23 | class RawMinkContext implements MinkAwareContext |
||
24 | { |
||
25 | private $mink; |
||
26 | private $minkParameters; |
||
27 | |||
28 | /** |
||
29 | * Currently supports PHPSTORM. |
||
30 | * |
||
31 | * @beforeScenario |
||
32 | */ |
||
33 | public function setUpXdebugIfIdeIsConfigured() |
||
39 | |||
40 | /** |
||
41 | * Sets Mink instance. |
||
42 | * |
||
43 | * @param Mink $mink Mink session manager |
||
44 | */ |
||
45 | public function setMink(Mink $mink) |
||
49 | |||
50 | /** |
||
51 | * Returns Mink instance. |
||
52 | * |
||
53 | * @return Mink |
||
54 | */ |
||
55 | public function getMink() |
||
66 | |||
67 | /** |
||
68 | * Returns the parameters provided for Mink. |
||
69 | * |
||
70 | * @return array |
||
71 | */ |
||
72 | public function getMinkParameters() |
||
76 | |||
77 | /** |
||
78 | * Sets parameters provided for Mink. |
||
79 | * |
||
80 | * @param array $parameters |
||
81 | */ |
||
82 | public function setMinkParameters(array $parameters) |
||
86 | |||
87 | /** |
||
88 | * Returns specific mink parameter. |
||
89 | * |
||
90 | * @param string $name |
||
91 | * |
||
92 | * @return mixed |
||
93 | */ |
||
94 | public function getMinkParameter($name) |
||
98 | |||
99 | /** |
||
100 | * Applies the given parameter to the Mink configuration. Consider that all parameters get reset for each |
||
101 | * feature context. |
||
102 | * |
||
103 | * @param string $name The key of the parameter |
||
104 | * @param string $value The value of the parameter |
||
105 | */ |
||
106 | public function setMinkParameter($name, $value) |
||
110 | |||
111 | /** |
||
112 | * Returns Mink session. |
||
113 | * |
||
114 | * @param string|null $name name of the session OR active session will be used |
||
115 | * |
||
116 | * @return Session |
||
117 | */ |
||
118 | public function getSession($name = null) |
||
122 | |||
123 | /** |
||
124 | * Returns Mink session assertion tool. |
||
125 | * |
||
126 | * @param string|null $name name of the session OR active session will be used |
||
127 | * |
||
128 | * @return WebAssert |
||
129 | */ |
||
130 | public function assertSession($name = null) |
||
134 | |||
135 | /** |
||
136 | * Visits provided relative path using provided or default session. |
||
137 | * |
||
138 | * @param string $path |
||
139 | * @param string|null $sessionName |
||
140 | */ |
||
141 | public function visitPath($path, $sessionName = null) |
||
145 | |||
146 | /** |
||
147 | * Locates url, based on provided path. |
||
148 | * Override to provide custom routing mechanism. |
||
149 | * |
||
150 | * @param string $path |
||
151 | * |
||
152 | * @return string |
||
153 | */ |
||
154 | public function locatePath($path) |
||
160 | |||
161 | /** |
||
162 | * Save a screenshot of the current window to the file system. |
||
163 | * |
||
164 | * @param string $filename Desired filename, defaults to |
||
165 | * <browser_name>_<ISO 8601 date>_<randomId>.png |
||
166 | * @param string $filepath Desired filepath, defaults to |
||
167 | * upload_tmp_dir, falls back to sys_get_temp_dir() |
||
168 | */ |
||
169 | public function saveScreenshot($filename = null, $filepath = null) |
||
177 | } |
||
178 |