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

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