Code Duplication    Length = 11-13 lines in 3 locations

tests/CommentAPITest.php 1 location

@@ 42-52 (lines=11) @@
39
     *
40
     * @return \App\Video
41
     */
42
    private function createFakeVideo($user)
43
    {
44
        $faker = Faker\Factory::create();
45
        $video = new Video();
46
        $video->name = $faker->sentence;
47
        $video->category = $faker->word;
48
        $video->path = $faker->url;
49
        $user->getVideos()->save($video);
50
51
        return $video;
52
    }
53
54
    private function createFakeComment($user_id, $video_id)
55
    {

tests/LikeDislikeAPITest.php 1 location

@@ 42-54 (lines=13) @@
39
     *
40
     * @return \App\Video
41
     */
42
    private function createFakeVideo($user)
43
    {
44
        $faker = Faker\Factory::create();
45
        $video = new Video();
46
        $video->name = $faker->sentence;
47
        $video->category = $faker->word;
48
        $video->path = $faker->url;
49
        $user->getVideos()->save($video);
50
51
        $this->createFakeLikes($video->id);
52
53
        return $video;
54
    }
55
56
    private function createFakeLikes($video_id)
57
    {

tests/VideoAPITest.php 1 location

@@ 47-57 (lines=11) @@
44
     *
45
     * @return \App\Video
46
     */
47
    private function createFakeVideo($user)
48
    {
49
        $faker = Faker\Factory::create();
50
        $video = new Video();
51
        $video->name = $faker->sentence;
52
        $video->category = $faker->word;
53
        $video->path = $faker->url;
54
        $user->getVideos()->save($video);
55
56
        return $video;
57
    }
58
59
    /**
60
     * Create fake videos.