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

@@ 240-257 (lines=18) @@
237
        $I->assertEquals($expected_order, $actual_order);
238
    }
239
240
    public function toCreateDirViaCollection(CliGuy $I)
241
    {
242
        // Set up a collection to add tasks to
243
        $collection = $I->collectionBuilder();
244
245
        // Set up a filesystem stack
246
        $collection->taskFilesystemStack()
247
            ->mkdir('log')
248
            ->touch('log/error.txt');
249
250
        // FilesystemStack has not run yet, so file should not be found.
251
        $I->dontSeeFileFound('log/error.txt');
252
253
        // Run the task collection; now the files should be present
254
        $collection->run();
255
        $I->seeFileFound('log/error.txt');
256
        $I->seeDirFound('log');
257
    }
258
259
    public function toUseATmpDirAndConfirmItIsDeleted(CliGuy $I)
260
    {