Code Duplication    Length = 12-12 lines in 3 locations

tests/integration/Modify/Transfer/TransferTest.php 3 locations

@@ 45-56 (lines=12) @@
42
        static::assertInstanceOf(FileTransferInterface::class, $this->transfer);
43
    }
44
45
    public function testCopyBetweenFileSystems()
46
    {
47
        $fromFile = new LocalFile(static::$dir . 'from_between.text');
48
        $fromFile->put('Some Text In Here');
49
50
        $toFile = new FileNode(new Filesystem(new MemoryAdapter()), 'some_file');
51
52
        $this->transfer->copyTo($fromFile, $toFile);
53
54
        static::assertEquals('Some Text In Here', $toFile->read());
55
        static::assertEquals($fromFile->read(), $toFile->read());
56
    }
57
58
    public function testCopyBetweenSameFileSystem()
59
    {
@@ 58-69 (lines=12) @@
55
        static::assertEquals($fromFile->read(), $toFile->read());
56
    }
57
58
    public function testCopyBetweenSameFileSystem()
59
    {
60
        $fromFile = new LocalFile(static::$dir . 'from_same.text');
61
        $fromFile->put('Some Text In Here');
62
63
        $toFile = new LocalFile(static::$dir . 'to_same.text');
64
65
        $this->transfer->copyTo($fromFile, $toFile);
66
67
        static::assertEquals('Some Text In Here', $toFile->read());
68
        static::assertEquals($fromFile->read(), $toFile->read());
69
    }
70
71
    public function testMoveDeletesTheOldFile()
72
    {
@@ 71-82 (lines=12) @@
68
        static::assertEquals($fromFile->read(), $toFile->read());
69
    }
70
71
    public function testMoveDeletesTheOldFile()
72
    {
73
        $fromFile = new LocalFile(static::$dir . 'delete_from.text');
74
        $fromFile->put('Some Text In Here');
75
76
        $toFile = new LocalFile(static::$dir . 'delete_to.text');
77
78
        $this->transfer->moveTo($fromFile, $toFile);
79
80
        static::assertEquals('Some Text In Here', $toFile->read());
81
        static::assertFalse($fromFile->exists());
82
    }
83
84
    public function testCopyWhenOriginalFileDoesNotExistThrowsAnException()
85
    {