Code Duplication    Length = 9-12 lines in 3 locations

tests/KochTest/Request/FTPTest.php 3 locations

@@ 92-103 (lines=12) @@
89
    /**
90
     * @covers Koch\Request\FTP::download
91
     */
92
    public function testDownload()
93
    {
94
        // setup method mock
95
        $this->object->expects($this->any())->method('download')->will($this->returnValue(true));
96
97
        $this->object->upload('testfile.txt', 'dir1/testfile.txt');
98
99
        $result = $this->object->download('dir1/testfile.txt', 'testfile_downloaded.txt');
100
101
        $this->assertTrue($result);
102
        //$this->assertTrue(is_file('testfile_downloaded.txt'));
103
    }
104
105
    /**
106
     * @covers Koch\Request\FTP::deleteFile
@@ 125-135 (lines=11) @@
122
    /**
123
     * @covers Koch\Request\FTP::renameOrMove
124
     */
125
    public function testRenameOrMove()
126
    {
127
        // setup method mock
128
        $this->object->expects($this->any())->method('renameOrMove')->will($this->returnValue(true));
129
130
        $this->object->upload('testfile.txt', 'testfile.txt', 1);
131
132
        $result = $this->object->renameOrMove('testfile.txt', 'testfile_renamed.txt');
133
134
        $this->assertTrue($result);
135
    }
136
137
    /**
138
     * @covers Koch\Request\FTP::createDirectory
@@ 220-228 (lines=9) @@
217
    /**
218
     * @covers Koch\Request\FTP::fileSize
219
     */
220
    public function testFileSize()
221
    {
222
        $this->object->expects($this->any())->method('fileSize')->will($this->returnValue(123));
223
224
        $this->object->upload('testfile.txt', 'testfile.txt', 2);
225
        $filesize = $this->object->fileSize('testfile.txt');
226
227
        $this->assertEquals($filesize, 123); /*filesize('testfile.txt')*/
228
    }
229
230
    /**
231
     * @covers Koch\Request\FTP::isDir