Code Duplication    Length = 11-11 lines in 2 locations

Tests/FileRepositoryTest.php 1 location

@@ 117-127 (lines=11) @@
114
        $this->assertCount(0, $this->file->all());
115
    }
116
117
    private function createFile($fileName = 'random/name.jpg')
118
    {
119
        return File::create([
120
            'filename' => $fileName,
121
            'path' => config('asgard.media.config.files-path') . $fileName,
122
            'extension' => substr(strrchr($fileName, "."), 1),
123
            'mimetype' => 'image/jpg',
124
            'filesize' => '1024',
125
            'folder_id' => 0,
126
        ]);
127
    }
128
129
    private function resetDatabase()
130
    {

Tests/FileTest.php 1 location

@@ 84-94 (lines=11) @@
81
        $this->assertFalse($file->getThumbnail('smallThumb'));
82
    }
83
84
    private function createFile($fileName = 'random/name.jpg')
85
    {
86
        return File::create([
87
            'filename' => $fileName,
88
            'path' => config('asgard.media.config.files-path') . $fileName,
89
            'extension' => substr(strrchr($fileName, "."), 1),
90
            'mimetype' => 'image/jpg',
91
            'filesize' => '1024',
92
            'folder_id' => 0,
93
        ]);
94
    }
95
96
    private function resetDatabase()
97
    {