Code Duplication    Length = 7-9 lines in 2 locations

test/unit/Platform/LinuxPlatformTest.php 1 location

@@ 36-42 (lines=7) @@
33
    /**
34
     * @inheritdoc TestCase
35
     */
36
    public function setUp() {
37
        $this->oldPath = getenv('PATH');
38
        putenv("PATH=/bin:{$this->oldPath}");
39
40
        $filesystem = $this->createMock(Filesystem::class);
41
        $this->platform = new LinuxPlatform($filesystem);
42
    }
43
44
    /**
45
     * @inheritdoc TestCase

test/unit/Platform/WindowsPlatformTest.php 1 location

@@ 41-49 (lines=9) @@
38
    /**
39
     * @inheritdoc TestCase
40
     */
41
    public function setUp() {
42
        $this->oldPath = getenv('PATH');
43
        putenv("PATH=C:\\windows\\system32;{$this->oldPath}");
44
45
        $this->oldWorkingDirectory = getcwd();
46
47
        $filesystem = $this->createMock(Filesystem::class);
48
        $this->platform = new WindowsPlatform($filesystem);
49
    }
50
51
    /**
52
     * @inheritdoc TestCase