Code Duplication    Length = 8-24 lines in 5 locations

tests/phpunit/tests/formatting/WpReplaceInHtmlTags.php 1 location

@@ 18-37 (lines=20) @@
15
        return $this->assertEquals($output, wp_replace_in_html_tags($input, array( "\n" => " " )));
16
    }
17
18
    function data_wp_replace_in_html_tags() 
19
    {
20
        return array(
21
         array(
22
          "Hello \n World",
23
          "Hello \n World",
24
         ),
25
         array(
26
          "<Hello \n World>",
27
          "<Hello   World>",
28
         ),
29
         array(
30
          "<!-- Hello \n World -->",
31
          "<!-- Hello   World -->",
32
         ),
33
         array(
34
          "<!-- Hello <\n> World -->",
35
          "<!-- Hello < > World -->",
36
         ),
37
        );
38
    }
39
}
40
?>

tests/phpunit/tests/formatting/WPTexturize.php 2 locations

@@ 519-538 (lines=20) @@
516
        return $this->assertEquals($output, wptexturize($input));
517
    }
518
519
    function data_double_prime() 
520
    {
521
        return array(
522
         array(
523
          'word 99" word',
524
          'word 99&#8243; word',
525
         ),
526
         array(
527
          'word 99"word',
528
          'word 99&#8243;word',
529
         ),
530
         array(
531
          'word99" word',
532
          'word99&#8243; word',
533
         ),
534
         array(
535
          'word99"word',
536
          'word99&#8243;word',
537
         ),
538
        );
539
    }
540
541
    /**
@@ 554-573 (lines=20) @@
551
        return $this->assertEquals($output, wptexturize($input));
552
    }
553
554
    function data_single_prime() 
555
    {
556
        return array(
557
         array(
558
          "word 99' word",
559
          "word 99&#8242; word",
560
         ),
561
         array(
562
          "word 99'word", // Not a prime anymore. Apostrophes get priority.
563
          "word 99&#8217;word",
564
         ),
565
         array(
566
          "word99' word",
567
          "word99&#8242; word",
568
         ),
569
         array(
570
          "word99'word", // Not a prime anymore.
571
          "word99&#8217;word",
572
         ),
573
        );
574
    }
575
576
    /**

tests/phpunit/tests/http/base.php 1 location

@@ 309-332 (lines=24) @@
306
        $this->assertEquals($method, wp_remote_retrieve_body($res));
307
    }
308
309
    public function data_post_redirect_to_method_300() 
310
    {
311
        return array(
312
         // Test 300 - POST to POST
313
         array(
314
          300,
315
          'POST',
316
         ),
317
         // Test 301 - POST to POST
318
         array(
319
          301,
320
          'POST',
321
         ),
322
         // Test 302 - POST to GET
323
         array(
324
          302,
325
          'GET',
326
         ),
327
         // Test 303 - POST to GET
328
         array(
329
          303,
330
          'GET',
331
         ),
332
        );
333
    }
334
335
    /**

tests/phpunit/tests/option/sanitize-option.php 1 location

@@ 92-99 (lines=8) @@
89
        $this->assertSame($sanitized, sanitize_option($option_name, $original));
90
    }
91
92
    public function upload_path_provider()  
93
    {
94
        return array(
95
         array( '<a href="http://www.example.com">Link</a>', 'Link' ),
96
         array( '<scr' . 'ipt>url</scr' . 'ipt>', 'url' ),
97
         array( '/path/to/things', '/path/to/things' ),
98
         array( '\path\to\things', '\path\to\things' ),
99
        );
100
    }
101
102
    /**