Code Duplication    Length = 17-18 lines in 2 locations

tests/cli/SimulatedCest.php 1 location

@@ 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

tests/cli/CollectionCest.php 1 location

@@ 229-246 (lines=18) @@
226
        $I->assertEquals($expected_order, $actual_order);
227
    }
228
229
    public function toCreateDirViaCollection(CliGuy $I)
230
    {
231
        // Set up a collection to add tasks to
232
        $collection = $I->collectionBuilder();
233
234
        // Set up a filesystem stack
235
        $collection->taskFilesystemStack()
236
            ->mkdir('log')
237
            ->touch('log/error.txt');
238
239
        // FilesystemStack has not run yet, so file should not be found.
240
        $I->dontSeeFileFound('log/error.txt');
241
242
        // Run the task collection; now the files should be present
243
        $collection->run();
244
        $I->seeFileFound('log/error.txt');
245
        $I->seeDirFound('log');
246
    }
247
248
    public function toUseATmpDirAndConfirmItIsDeleted(CliGuy $I)
249
    {