Code Duplication    Length = 12-12 lines in 4 locations

tests/AppBundle/Sync/Entity/Filter/ExcludeEpisodesTest.php 2 locations

@@ 62-73 (lines=12) @@
59
     * @expectedException \AppBundle\Exception\ExcludeFilterException
60
     * @expectedExceptionCode \AppBundle\Exception\ExcludeFilterException::INVALID_JSON
61
     */
62
    public function testInvalidContent()
63
    {
64
        $tree = ['exclude.list' => 'bad data'];
65
66
        // Init virtual FS
67
        vfsStream::setup('root', null, $tree);
68
69
        $filter = new ExcludeEpisodes();
70
        $filter->setPath(vfsStream::url('root/exclude.list'));
71
72
        $filter->valid(new File());
73
    }
74
75
    /**
76
     * @expectedException \AppBundle\Exception\ExcludeFilterException
@@ 79-90 (lines=12) @@
76
     * @expectedException \AppBundle\Exception\ExcludeFilterException
77
     * @expectedExceptionCode \AppBundle\Exception\ExcludeFilterException::NOT_ARRAY
78
     */
79
    public function testContentNotArray()
80
    {
81
        $tree = ['exclude.list' => '"bad data"'];
82
83
        // Init virtual FS
84
        vfsStream::setup('root', null, $tree);
85
86
        $filter = new ExcludeEpisodes();
87
        $filter->setPath(vfsStream::url('root/exclude.list'));
88
89
        $filter->valid(new File());
90
    }
91
}
92

tests/AppBundle/Sync/Entity/Filter/ExcludeShowsTest.php 2 locations

@@ 62-73 (lines=12) @@
59
     * @expectedException \AppBundle\Exception\ExcludeFilterException
60
     * @expectedExceptionCode \AppBundle\Exception\ExcludeFilterException::INVALID_JSON
61
     */
62
    public function testInvalidContent()
63
    {
64
        $tree = ['exclude.list' => 'bad data'];
65
66
        // Init virtual FS
67
        vfsStream::setup('root', null, $tree);
68
69
        $filter = new ExcludeShows();
70
        $filter->setPath(vfsStream::url('root/exclude.list'));
71
72
        $filter->valid(new File());
73
    }
74
75
    /**
76
     * @expectedException \AppBundle\Exception\ExcludeFilterException
@@ 79-90 (lines=12) @@
76
     * @expectedException \AppBundle\Exception\ExcludeFilterException
77
     * @expectedExceptionCode \AppBundle\Exception\ExcludeFilterException::NOT_ARRAY
78
     */
79
    public function testContentNotArray()
80
    {
81
        $tree = ['exclude.list' => '"bad data"'];
82
83
        // Init virtual FS
84
        vfsStream::setup('root', null, $tree);
85
86
        $filter = new ExcludeShows();
87
        $filter->setPath(vfsStream::url('root/exclude.list'));
88
89
        $filter->valid(new File());
90
    }
91
}
92