1 | <?php |
||
10 | class BaseGherkinToDusk |
||
11 | { |
||
12 | |||
13 | protected $features_folder = '/tests/features/'; |
||
14 | |||
15 | protected $source_path = null; |
||
16 | |||
17 | protected $context = "domain"; |
||
18 | |||
19 | protected $path_to_feature = null; |
||
20 | |||
21 | |||
22 | protected $dusk_test_name; |
||
23 | |||
24 | /** |
||
25 | * Conventions |
||
26 | * file should be in tests/features for now |
||
27 | * @var null |
||
28 | */ |
||
29 | protected $file_name = null; |
||
30 | |||
31 | protected $file_name_and_path = null; |
||
32 | |||
33 | protected $destination_folder_root = null; |
||
34 | |||
35 | /** |
||
36 | * @var Filesystem |
||
37 | */ |
||
38 | protected $filesystem; |
||
39 | |||
40 | /** |
||
41 | * @var Parser |
||
42 | */ |
||
43 | protected $parser; |
||
44 | |||
45 | |||
46 | protected $output; |
||
47 | |||
48 | /** |
||
49 | * @var Application |
||
50 | */ |
||
51 | protected $app; |
||
52 | |||
53 | 75 | public function __construct(Application $app) |
|
61 | |||
62 | |||
63 | public function getFileName() |
||
67 | |||
68 | public function setFileName($file_name) |
||
73 | |||
74 | /** |
||
75 | * @return Filesystem |
||
76 | */ |
||
77 | 57 | public function getFilesystem() |
|
81 | |||
82 | /** |
||
83 | * @param null $filesystem |
||
84 | * @return $this |
||
85 | */ |
||
86 | public function setFilesystem($filesystem = null) |
||
95 | |||
96 | /** |
||
97 | * @return null |
||
98 | */ |
||
99 | public function getFileNameAndPath() |
||
106 | |||
107 | /** |
||
108 | * @param null $file_name_and_path |
||
109 | * @return $this |
||
110 | */ |
||
111 | public function setFileNameAndPath($file_name_and_path = null) |
||
122 | |||
123 | |||
124 | |||
125 | /** |
||
126 | * @return null |
||
127 | */ |
||
128 | 63 | public function getSourcePath() |
|
135 | |||
136 | /** |
||
137 | * @param null $source_path |
||
138 | */ |
||
139 | 63 | public function setSourcePath($source_path = null) |
|
147 | |||
148 | /** |
||
149 | * @return null |
||
150 | */ |
||
151 | 69 | public function getDestinationFolderRoot() |
|
158 | |||
159 | /** |
||
160 | * @param null $destination_folder_root |
||
161 | */ |
||
162 | 69 | public function setDestinationFolderRoot($destination_folder_root = null) |
|
170 | |||
171 | /** |
||
172 | * @return string |
||
173 | */ |
||
174 | public function getContext() |
||
178 | |||
179 | /** |
||
180 | * @param string $context |
||
181 | * @return $this |
||
182 | */ |
||
183 | 63 | public function setContext($context) |
|
188 | |||
189 | /** |
||
190 | * @return Parser |
||
191 | */ |
||
192 | 54 | public function getParser() |
|
196 | |||
197 | /** |
||
198 | * @param Parser $parser |
||
199 | */ |
||
200 | public function setParser($parser) |
||
204 | |||
205 | |||
206 | /** |
||
207 | * @return null |
||
208 | */ |
||
209 | 57 | public function getPathToFeature() |
|
213 | |||
214 | /** |
||
215 | * @param null $path_to_feature |
||
216 | * @return $this |
||
217 | */ |
||
218 | 57 | public function setPathToFeature($path_to_feature) |
|
223 | |||
224 | 33 | public function fullPathToDestinationFile() |
|
228 | |||
229 | |||
230 | 57 | protected function buildDuskTestName() |
|
237 | |||
238 | 57 | protected function getFullPathToFileAndFileName() |
|
242 | |||
243 | /** |
||
244 | * @return mixed |
||
245 | */ |
||
246 | 57 | public function getDuskTestName() |
|
250 | |||
251 | /** |
||
252 | * @param mixed $dusk_test_name |
||
253 | */ |
||
254 | public function setDuskTestName($dusk_test_name) |
||
258 | |||
259 | 69 | private function getContextFolder() |
|
271 | } |
||
272 |