1 | <?php //[STAMP] d6606f78456705b0875c6b8343fc6a4a |
||
12 | trait AcceptanceTesterActions |
||
13 | { |
||
14 | /** |
||
15 | * @return \Codeception\Scenario |
||
16 | */ |
||
17 | abstract protected function getScenario(); |
||
18 | |||
19 | |||
20 | /** |
||
21 | * [!] Method is generated. Documentation taken from corresponding module. |
||
22 | * |
||
23 | * Checks that array contains subset. |
||
24 | * |
||
25 | * @param array $subset |
||
26 | * @param array $array |
||
27 | * @param bool $strict |
||
28 | * @param string $message |
||
29 | * @see \Codeception\Module::assertArraySubset() |
||
30 | */ |
||
31 | public function assertArraySubset($subset, $array, $strict = null, $message = null) { |
||
34 | |||
35 | |||
36 | /** |
||
37 | * [!] Method is generated. Documentation taken from corresponding module. |
||
38 | * |
||
39 | * Executes a shell command. |
||
40 | * Fails If exit code is > 0. You can disable this by setting second parameter to false |
||
41 | * |
||
42 | * ```php |
||
43 | * <?php |
||
44 | * $I->runShellCommand('phpunit'); |
||
45 | * |
||
46 | * // do not fail test when command fails |
||
47 | * $I->runShellCommand('phpunit', false); |
||
48 | * ``` |
||
49 | * |
||
50 | * @param $command |
||
51 | * @param bool $failNonZero |
||
52 | * @see \Codeception\Module\Cli::runShellCommand() |
||
53 | */ |
||
54 | public function runShellCommand($command, $failNonZero = null) { |
||
57 | |||
58 | |||
59 | /** |
||
60 | * [!] Method is generated. Documentation taken from corresponding module. |
||
61 | * |
||
62 | * Checks that output from last executed command contains text |
||
63 | * |
||
64 | * @param $text |
||
65 | * Conditional Assertion: Test won't be stopped on fail |
||
66 | * @see \Codeception\Module\Cli::seeInShellOutput() |
||
67 | */ |
||
68 | public function canSeeInShellOutput($text) { |
||
71 | /** |
||
72 | * [!] Method is generated. Documentation taken from corresponding module. |
||
73 | * |
||
74 | * Checks that output from last executed command contains text |
||
75 | * |
||
76 | * @param $text |
||
77 | * @see \Codeception\Module\Cli::seeInShellOutput() |
||
78 | */ |
||
79 | public function seeInShellOutput($text) { |
||
82 | |||
83 | |||
84 | /** |
||
85 | * [!] Method is generated. Documentation taken from corresponding module. |
||
86 | * |
||
87 | * Checks that output from latest command doesn't contain text |
||
88 | * |
||
89 | * @param $text |
||
90 | * |
||
91 | * Conditional Assertion: Test won't be stopped on fail |
||
92 | * @see \Codeception\Module\Cli::dontSeeInShellOutput() |
||
93 | */ |
||
94 | public function cantSeeInShellOutput($text) { |
||
97 | /** |
||
98 | * [!] Method is generated. Documentation taken from corresponding module. |
||
99 | * |
||
100 | * Checks that output from latest command doesn't contain text |
||
101 | * |
||
102 | * @param $text |
||
103 | * |
||
104 | * @see \Codeception\Module\Cli::dontSeeInShellOutput() |
||
105 | */ |
||
106 | public function dontSeeInShellOutput($text) { |
||
109 | |||
110 | |||
111 | /** |
||
112 | * [!] Method is generated. Documentation taken from corresponding module. |
||
113 | * |
||
114 | * @param $regex |
||
115 | * Conditional Assertion: Test won't be stopped on fail |
||
116 | * @see \Codeception\Module\Cli::seeShellOutputMatches() |
||
117 | */ |
||
118 | public function canSeeShellOutputMatches($regex) { |
||
121 | /** |
||
122 | * [!] Method is generated. Documentation taken from corresponding module. |
||
123 | * |
||
124 | * @param $regex |
||
125 | * @see \Codeception\Module\Cli::seeShellOutputMatches() |
||
126 | */ |
||
127 | public function seeShellOutputMatches($regex) { |
||
130 | |||
131 | |||
132 | /** |
||
133 | * [!] Method is generated. Documentation taken from corresponding module. |
||
134 | * |
||
135 | * Checks result code |
||
136 | * |
||
137 | * ```php |
||
138 | * <?php |
||
139 | * $I->seeResultCodeIs(0); |
||
140 | * ``` |
||
141 | * |
||
142 | * @param $code |
||
143 | * Conditional Assertion: Test won't be stopped on fail |
||
144 | * @see \Codeception\Module\Cli::seeResultCodeIs() |
||
145 | */ |
||
146 | public function canSeeResultCodeIs($code) { |
||
149 | /** |
||
150 | * [!] Method is generated. Documentation taken from corresponding module. |
||
151 | * |
||
152 | * Checks result code |
||
153 | * |
||
154 | * ```php |
||
155 | * <?php |
||
156 | * $I->seeResultCodeIs(0); |
||
157 | * ``` |
||
158 | * |
||
159 | * @param $code |
||
160 | * @see \Codeception\Module\Cli::seeResultCodeIs() |
||
161 | */ |
||
162 | public function seeResultCodeIs($code) { |
||
165 | |||
166 | |||
167 | /** |
||
168 | * [!] Method is generated. Documentation taken from corresponding module. |
||
169 | * |
||
170 | * Checks result code |
||
171 | * |
||
172 | * ```php |
||
173 | * <?php |
||
174 | * $I->seeResultCodeIsNot(0); |
||
175 | * ``` |
||
176 | * |
||
177 | * @param $code |
||
178 | * Conditional Assertion: Test won't be stopped on fail |
||
179 | * @see \Codeception\Module\Cli::seeResultCodeIsNot() |
||
180 | */ |
||
181 | public function canSeeResultCodeIsNot($code) { |
||
184 | /** |
||
185 | * [!] Method is generated. Documentation taken from corresponding module. |
||
186 | * |
||
187 | * Checks result code |
||
188 | * |
||
189 | * ```php |
||
190 | * <?php |
||
191 | * $I->seeResultCodeIsNot(0); |
||
192 | * ``` |
||
193 | * |
||
194 | * @param $code |
||
195 | * @see \Codeception\Module\Cli::seeResultCodeIsNot() |
||
196 | */ |
||
197 | public function seeResultCodeIsNot($code) { |
||
200 | |||
201 | |||
202 | /** |
||
203 | * [!] Method is generated. Documentation taken from corresponding module. |
||
204 | * |
||
205 | * Enters a directory In local filesystem. |
||
206 | * Project root directory is used by default |
||
207 | * |
||
208 | * @param string $path |
||
209 | * @see \Codeception\Module\Filesystem::amInPath() |
||
210 | */ |
||
211 | public function amInPath($path) { |
||
214 | |||
215 | |||
216 | /** |
||
217 | * [!] Method is generated. Documentation taken from corresponding module. |
||
218 | * |
||
219 | * Opens a file and stores it's content. |
||
220 | * |
||
221 | * Usage: |
||
222 | * |
||
223 | * ``` php |
||
224 | * <?php |
||
225 | * $I->openFile('composer.json'); |
||
226 | * $I->seeInThisFile('codeception/codeception'); |
||
227 | * ?> |
||
228 | * ``` |
||
229 | * |
||
230 | * @param string $filename |
||
231 | * @see \Codeception\Module\Filesystem::openFile() |
||
232 | */ |
||
233 | public function openFile($filename) { |
||
236 | |||
237 | |||
238 | /** |
||
239 | * [!] Method is generated. Documentation taken from corresponding module. |
||
240 | * |
||
241 | * Deletes a file |
||
242 | * |
||
243 | * ``` php |
||
244 | * <?php |
||
245 | * $I->deleteFile('composer.lock'); |
||
246 | * ?> |
||
247 | * ``` |
||
248 | * |
||
249 | * @param string $filename |
||
250 | * @see \Codeception\Module\Filesystem::deleteFile() |
||
251 | */ |
||
252 | public function deleteFile($filename) { |
||
255 | |||
256 | |||
257 | /** |
||
258 | * [!] Method is generated. Documentation taken from corresponding module. |
||
259 | * |
||
260 | * Deletes directory with all subdirectories |
||
261 | * |
||
262 | * ``` php |
||
263 | * <?php |
||
264 | * $I->deleteDir('vendor'); |
||
265 | * ?> |
||
266 | * ``` |
||
267 | * |
||
268 | * @param string $dirname |
||
269 | * @see \Codeception\Module\Filesystem::deleteDir() |
||
270 | */ |
||
271 | public function deleteDir($dirname) { |
||
274 | |||
275 | |||
276 | /** |
||
277 | * [!] Method is generated. Documentation taken from corresponding module. |
||
278 | * |
||
279 | * Copies directory with all contents |
||
280 | * |
||
281 | * ``` php |
||
282 | * <?php |
||
283 | * $I->copyDir('vendor','old_vendor'); |
||
284 | * ?> |
||
285 | * ``` |
||
286 | * |
||
287 | * @param string $src |
||
288 | * @param string $dst |
||
289 | * @see \Codeception\Module\Filesystem::copyDir() |
||
290 | */ |
||
291 | public function copyDir($src, $dst) { |
||
294 | |||
295 | |||
296 | /** |
||
297 | * [!] Method is generated. Documentation taken from corresponding module. |
||
298 | * |
||
299 | * Checks If opened file has `text` in it. |
||
300 | * |
||
301 | * Usage: |
||
302 | * |
||
303 | * ``` php |
||
304 | * <?php |
||
305 | * $I->openFile('composer.json'); |
||
306 | * $I->seeInThisFile('codeception/codeception'); |
||
307 | * ?> |
||
308 | * ``` |
||
309 | * |
||
310 | * @param string $text |
||
311 | * Conditional Assertion: Test won't be stopped on fail |
||
312 | * @see \Codeception\Module\Filesystem::seeInThisFile() |
||
313 | */ |
||
314 | public function canSeeInThisFile($text) { |
||
317 | /** |
||
318 | * [!] Method is generated. Documentation taken from corresponding module. |
||
319 | * |
||
320 | * Checks If opened file has `text` in it. |
||
321 | * |
||
322 | * Usage: |
||
323 | * |
||
324 | * ``` php |
||
325 | * <?php |
||
326 | * $I->openFile('composer.json'); |
||
327 | * $I->seeInThisFile('codeception/codeception'); |
||
328 | * ?> |
||
329 | * ``` |
||
330 | * |
||
331 | * @param string $text |
||
332 | * @see \Codeception\Module\Filesystem::seeInThisFile() |
||
333 | */ |
||
334 | public function seeInThisFile($text) { |
||
337 | |||
338 | |||
339 | /** |
||
340 | * [!] Method is generated. Documentation taken from corresponding module. |
||
341 | * |
||
342 | * Checks If opened file has the `number` of new lines. |
||
343 | * |
||
344 | * Usage: |
||
345 | * |
||
346 | * ``` php |
||
347 | * <?php |
||
348 | * $I->openFile('composer.json'); |
||
349 | * $I->seeNumberNewLines(5); |
||
350 | * ?> |
||
351 | * ``` |
||
352 | * |
||
353 | * @param int $number New lines |
||
354 | * Conditional Assertion: Test won't be stopped on fail |
||
355 | * @see \Codeception\Module\Filesystem::seeNumberNewLines() |
||
356 | */ |
||
357 | public function canSeeNumberNewLines($number) { |
||
360 | /** |
||
361 | * [!] Method is generated. Documentation taken from corresponding module. |
||
362 | * |
||
363 | * Checks If opened file has the `number` of new lines. |
||
364 | * |
||
365 | * Usage: |
||
366 | * |
||
367 | * ``` php |
||
368 | * <?php |
||
369 | * $I->openFile('composer.json'); |
||
370 | * $I->seeNumberNewLines(5); |
||
371 | * ?> |
||
372 | * ``` |
||
373 | * |
||
374 | * @param int $number New lines |
||
375 | * @see \Codeception\Module\Filesystem::seeNumberNewLines() |
||
376 | */ |
||
377 | public function seeNumberNewLines($number) { |
||
380 | |||
381 | |||
382 | /** |
||
383 | * [!] Method is generated. Documentation taken from corresponding module. |
||
384 | * |
||
385 | * Checks that contents of currently opened file matches $regex |
||
386 | * |
||
387 | * @param string $regex |
||
388 | * Conditional Assertion: Test won't be stopped on fail |
||
389 | * @see \Codeception\Module\Filesystem::seeThisFileMatches() |
||
390 | */ |
||
391 | public function canSeeThisFileMatches($regex) { |
||
394 | /** |
||
395 | * [!] Method is generated. Documentation taken from corresponding module. |
||
396 | * |
||
397 | * Checks that contents of currently opened file matches $regex |
||
398 | * |
||
399 | * @param string $regex |
||
400 | * @see \Codeception\Module\Filesystem::seeThisFileMatches() |
||
401 | */ |
||
402 | public function seeThisFileMatches($regex) { |
||
405 | |||
406 | |||
407 | /** |
||
408 | * [!] Method is generated. Documentation taken from corresponding module. |
||
409 | * |
||
410 | * Checks the strict matching of file contents. |
||
411 | * Unlike `seeInThisFile` will fail if file has something more than expected lines. |
||
412 | * Better to use with HEREDOC strings. |
||
413 | * Matching is done after removing "\r" chars from file content. |
||
414 | * |
||
415 | * ``` php |
||
416 | * <?php |
||
417 | * $I->openFile('process.pid'); |
||
418 | * $I->seeFileContentsEqual('3192'); |
||
419 | * ?> |
||
420 | * ``` |
||
421 | * |
||
422 | * @param string $text |
||
423 | * Conditional Assertion: Test won't be stopped on fail |
||
424 | * @see \Codeception\Module\Filesystem::seeFileContentsEqual() |
||
425 | */ |
||
426 | public function canSeeFileContentsEqual($text) { |
||
429 | /** |
||
430 | * [!] Method is generated. Documentation taken from corresponding module. |
||
431 | * |
||
432 | * Checks the strict matching of file contents. |
||
433 | * Unlike `seeInThisFile` will fail if file has something more than expected lines. |
||
434 | * Better to use with HEREDOC strings. |
||
435 | * Matching is done after removing "\r" chars from file content. |
||
436 | * |
||
437 | * ``` php |
||
438 | * <?php |
||
439 | * $I->openFile('process.pid'); |
||
440 | * $I->seeFileContentsEqual('3192'); |
||
441 | * ?> |
||
442 | * ``` |
||
443 | * |
||
444 | * @param string $text |
||
445 | * @see \Codeception\Module\Filesystem::seeFileContentsEqual() |
||
446 | */ |
||
447 | public function seeFileContentsEqual($text) { |
||
450 | |||
451 | |||
452 | /** |
||
453 | * [!] Method is generated. Documentation taken from corresponding module. |
||
454 | * |
||
455 | * Checks If opened file doesn't contain `text` in it |
||
456 | * |
||
457 | * ``` php |
||
458 | * <?php |
||
459 | * $I->openFile('composer.json'); |
||
460 | * $I->dontSeeInThisFile('codeception/codeception'); |
||
461 | * ?> |
||
462 | * ``` |
||
463 | * |
||
464 | * @param string $text |
||
465 | * Conditional Assertion: Test won't be stopped on fail |
||
466 | * @see \Codeception\Module\Filesystem::dontSeeInThisFile() |
||
467 | */ |
||
468 | public function cantSeeInThisFile($text) { |
||
471 | /** |
||
472 | * [!] Method is generated. Documentation taken from corresponding module. |
||
473 | * |
||
474 | * Checks If opened file doesn't contain `text` in it |
||
475 | * |
||
476 | * ``` php |
||
477 | * <?php |
||
478 | * $I->openFile('composer.json'); |
||
479 | * $I->dontSeeInThisFile('codeception/codeception'); |
||
480 | * ?> |
||
481 | * ``` |
||
482 | * |
||
483 | * @param string $text |
||
484 | * @see \Codeception\Module\Filesystem::dontSeeInThisFile() |
||
485 | */ |
||
486 | public function dontSeeInThisFile($text) { |
||
489 | |||
490 | |||
491 | /** |
||
492 | * [!] Method is generated. Documentation taken from corresponding module. |
||
493 | * |
||
494 | * Deletes a file |
||
495 | * @see \Codeception\Module\Filesystem::deleteThisFile() |
||
496 | */ |
||
497 | public function deleteThisFile() { |
||
500 | |||
501 | |||
502 | /** |
||
503 | * [!] Method is generated. Documentation taken from corresponding module. |
||
504 | * |
||
505 | * Checks if file exists in path. |
||
506 | * Opens a file when it's exists |
||
507 | * |
||
508 | * ``` php |
||
509 | * <?php |
||
510 | * $I->seeFileFound('UserModel.php','app/models'); |
||
511 | * ?> |
||
512 | * ``` |
||
513 | * |
||
514 | * @param string $filename |
||
515 | * @param string $path |
||
516 | * Conditional Assertion: Test won't be stopped on fail |
||
517 | * @see \Codeception\Module\Filesystem::seeFileFound() |
||
518 | */ |
||
519 | public function canSeeFileFound($filename, $path = null) { |
||
522 | /** |
||
523 | * [!] Method is generated. Documentation taken from corresponding module. |
||
524 | * |
||
525 | * Checks if file exists in path. |
||
526 | * Opens a file when it's exists |
||
527 | * |
||
528 | * ``` php |
||
529 | * <?php |
||
530 | * $I->seeFileFound('UserModel.php','app/models'); |
||
531 | * ?> |
||
532 | * ``` |
||
533 | * |
||
534 | * @param string $filename |
||
535 | * @param string $path |
||
536 | * @see \Codeception\Module\Filesystem::seeFileFound() |
||
537 | */ |
||
538 | public function seeFileFound($filename, $path = null) { |
||
541 | |||
542 | |||
543 | /** |
||
544 | * [!] Method is generated. Documentation taken from corresponding module. |
||
545 | * |
||
546 | * Checks if file does not exist in path |
||
547 | * |
||
548 | * @param string $filename |
||
549 | * @param string $path |
||
550 | * Conditional Assertion: Test won't be stopped on fail |
||
551 | * @see \Codeception\Module\Filesystem::dontSeeFileFound() |
||
552 | */ |
||
553 | public function cantSeeFileFound($filename, $path = null) { |
||
556 | /** |
||
557 | * [!] Method is generated. Documentation taken from corresponding module. |
||
558 | * |
||
559 | * Checks if file does not exist in path |
||
560 | * |
||
561 | * @param string $filename |
||
562 | * @param string $path |
||
563 | * @see \Codeception\Module\Filesystem::dontSeeFileFound() |
||
564 | */ |
||
565 | public function dontSeeFileFound($filename, $path = null) { |
||
568 | |||
569 | |||
570 | /** |
||
571 | * [!] Method is generated. Documentation taken from corresponding module. |
||
572 | * |
||
573 | * Erases directory contents |
||
574 | * |
||
575 | * ``` php |
||
576 | * <?php |
||
577 | * $I->cleanDir('logs'); |
||
578 | * ?> |
||
579 | * ``` |
||
580 | * |
||
581 | * @param string $dirname |
||
582 | * @see \Codeception\Module\Filesystem::cleanDir() |
||
583 | */ |
||
584 | public function cleanDir($dirname) { |
||
587 | |||
588 | |||
589 | /** |
||
590 | * [!] Method is generated. Documentation taken from corresponding module. |
||
591 | * |
||
592 | * Saves contents to file |
||
593 | * |
||
594 | * @param string $filename |
||
595 | * @param string $contents |
||
596 | * @see \Codeception\Module\Filesystem::writeToFile() |
||
597 | */ |
||
598 | public function writeToFile($filename, $contents) { |
||
601 | } |
||
602 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.