@@ 13-29 (lines=17) @@ | ||
10 | $I->amInPath(codecept_data_dir().'sandbox'); |
|
11 | } |
|
12 | ||
13 | public function toSimulateDirCreation(CliGuy $I) |
|
14 | { |
|
15 | // Set up a collection to add tasks to |
|
16 | $collection = $I->collectionBuilder(); |
|
17 | $collection->simulated(true); |
|
18 | ||
19 | // Set up a filesystem stack |
|
20 | $collection->taskFilesystemStack() |
|
21 | ->mkdir('simulatedir') |
|
22 | ->touch('simulatedir/error.txt'); |
|
23 | ||
24 | // Run the task collection; now the files should be present |
|
25 | $collection->run(); |
|
26 | // Nothing should be created in simulated mode |
|
27 | $I->dontSeeFileFound('simulatedir/error.txt'); |
|
28 | $I->seeInOutput('[Simulator] Simulating Filesystem\FilesystemStack()'); |
|
29 | } |
|
30 | } |
|
31 |
@@ 273-290 (lines=18) @@ | ||
270 | $I->assertEquals($expected_order, $actual_order); |
|
271 | } |
|
272 | ||
273 | public function toCreateDirViaCollection(CliGuy $I) |
|
274 | { |
|
275 | // Set up a collection to add tasks to |
|
276 | $collection = $I->collectionBuilder(); |
|
277 | ||
278 | // Set up a filesystem stack |
|
279 | $collection->taskFilesystemStack() |
|
280 | ->mkdir('log') |
|
281 | ->touch('log/error.txt'); |
|
282 | ||
283 | // FilesystemStack has not run yet, so file should not be found. |
|
284 | $I->dontSeeFileFound('log/error.txt'); |
|
285 | ||
286 | // Run the task collection; now the files should be present |
|
287 | $collection->run(); |
|
288 | $I->seeFileFound('log/error.txt'); |
|
289 | $I->seeDirFound('log'); |
|
290 | } |
|
291 | ||
292 | public function toUseATmpDirAndConfirmItIsDeleted(CliGuy $I) |
|
293 | { |