Code Duplication    Length = 14-19 lines in 2 locations

tests/GalleryImageShortCodeHandlerTest.php 2 locations

@@ 27-40 (lines=14) @@
24
  }
25
26
27
    public function testNonExistentImage()
28
    {
29
        $page = $this->objFromFixture('Page', 'page02');
30
31
        $galleryImage = $this->objFromFixture('GalleryImage', 'gi01');
32
        $nonExistentID = 1000+$galleryImage->ID;
33
        // his will not exist
34
        $content = "[GalleryImage id='{$nonExistentID}']";
35
        $page->Content = $content;
36
        $page->write();
37
        $html = ShortcodeParser::get_active()->parse($page->Content);
38
39
        $this->assertEquals('image not found', $html);
40
    }
41
}
42
@@ 6-24 (lines=19) @@
3
class GalleryImageShortCodeHandlerTest extends SapphireTest {
4
  protected static $fixture_file = 'ss3gallery/tests/ss3gallery.yml';
5
6
    public function testValidImage()
7
    {
8
        $page = $this->objFromFixture('Page', 'page02');
9
10
        $galleryImage = $this->objFromFixture('GalleryImage', 'gi01');
11
        $content = "[GalleryImage id='{$galleryImage->ID}']";
12
        $page->Content = $content;
13
        $page->write();
14
        $html = ShortcodeParser::get_active()->parse($page->Content);
15
16
        $this->assertEquals('<div class="imageWithCaption centercontents ">
17
<img src=""><div class="meta">
18
    <p class="exif">f s </p>
19
    <p class="caption">Test Image 1</p>
20
</div>
21
</div>
22
23
', $html);
24
  }
25
26
27
    public function testNonExistentImage()