Code Duplication    Length = 12-12 lines in 2 locations

tests/phpunit/tests/media.php 2 locations

@@ 116-127 (lines=12) @@
113
        $this->assertEquals(1, preg_match_all("~wp-caption-text.*{$content_preg}~", $result, $_r));
114
    }
115
116
    function test_new_img_caption_shortcode_new_format_and_linked_image() 
117
    {
118
        $linked_image = "<a href='#'>{$this->img_content}</a>";
119
        $result = img_caption_shortcode(
120
            array( 'width' => 20 ),
121
            $linked_image . $this->html_content
122
        );
123
        $img_preg = preg_quote($linked_image);
124
        $content_preg = preg_quote($this->html_content);
125
126
        $this->assertEquals(1, preg_match_all("~{$img_preg}.*wp-caption-text~", $result, $_r));
127
        $this->assertEquals(1, preg_match_all("~wp-caption-text.*{$content_preg}~", $result, $_r));
128
    }
129
130
    function test_new_img_caption_shortcode_new_format_and_linked_image_with_newline() 
@@ 130-141 (lines=12) @@
127
        $this->assertEquals(1, preg_match_all("~wp-caption-text.*{$content_preg}~", $result, $_r));
128
    }
129
130
    function test_new_img_caption_shortcode_new_format_and_linked_image_with_newline() 
131
    {
132
        $linked_image = "<a href='#'>{$this->img_content}</a>";
133
        $result = img_caption_shortcode(
134
            array( 'width' => 20 ),
135
            $linked_image . "\n\n" . $this->html_content
136
        );
137
        $img_preg = preg_quote($linked_image);
138
        $content_preg = preg_quote($this->html_content);
139
140
        $this->assertEquals(1, preg_match_all("~{$img_preg}.*wp-caption-text~", $result, $_r));
141
        $this->assertEquals(1, preg_match_all("~wp-caption-text.*{$content_preg}~", $result, $_r));
142
    }
143
144
    function test_add_remove_oembed_provider()