Code Duplication    Length = 15-18 lines in 2 locations

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

@@ 25-39 (lines=15) @@
22
        return 'http://example.com/';
23
    }
24
25
    function test_wp_sanitize_redirect() 
26
    {
27
        $this->assertEquals('http://example.com/watchthelinefeedgo', wp_sanitize_redirect('http://example.com/watchthelinefeed%0Ago'));
28
        $this->assertEquals('http://example.com/watchthelinefeedgo', wp_sanitize_redirect('http://example.com/watchthelinefeed%0ago'));
29
        $this->assertEquals('http://example.com/watchthecarriagereturngo', wp_sanitize_redirect('http://example.com/watchthecarriagereturn%0Dgo'));
30
        $this->assertEquals('http://example.com/watchthecarriagereturngo', wp_sanitize_redirect('http://example.com/watchthecarriagereturn%0dgo'));
31
        $this->assertEquals('http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay', wp_sanitize_redirect('http://example.com/watchtheallowedcharacters-~+_.?#=&;,/:%!*stay'));
32
        $this->assertEquals('http://example.com/watchtheutf8convert%F0%9D%8C%86', wp_sanitize_redirect("http://example.com/watchtheutf8convert\xf0\x9d\x8c\x86"));
33
        //Nesting checks
34
        $this->assertEquals('http://example.com/watchthecarriagereturngo', wp_sanitize_redirect('http://example.com/watchthecarriagereturn%0%0ddgo'));
35
        $this->assertEquals('http://example.com/watchthecarriagereturngo', wp_sanitize_redirect('http://example.com/watchthecarriagereturn%0%0DDgo'));
36
        $this->assertEquals('http://example.com/whyisthisintheurl/?param[1]=foo', wp_sanitize_redirect('http://example.com/whyisthisintheurl/?param[1]=foo'));
37
        $this->assertEquals('http://[2606:2800:220:6d:26bf:1447:aa7]/', wp_sanitize_redirect('http://[2606:2800:220:6d:26bf:1447:aa7]/'));
38
        $this->assertEquals('http://example.com/search.php?search=(amistillhere)', wp_sanitize_redirect('http://example.com/search.php?search=(amistillhere)'));
39
        $this->assertEquals('http://example.com/@username', wp_sanitize_redirect('http://example.com/@username'));
40
    }
41
42
    /**

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

@@ 53-70 (lines=18) @@
50
    }
51
52
    //WP Ticket #4539
53
    function test_basic_quotes() 
54
    {
55
        $this->assertEquals('test’s', wptexturize('test\'s'));
56
57
        $this->assertEquals('‘quoted’', wptexturize('\'quoted\''));
58
        $this->assertEquals('“quoted”', wptexturize('"quoted"'));
59
60
        $this->assertEquals('space before ‘quoted’ space after', wptexturize('space before \'quoted\' space after'));
61
        $this->assertEquals('space before “quoted” space after', wptexturize('space before "quoted" space after'));
62
63
        $this->assertEquals('(‘quoted’)', wptexturize('(\'quoted\')'));
64
        $this->assertEquals('{“quoted”}', wptexturize('{"quoted"}'));
65
66
        $this->assertEquals('‘qu(ot)ed’', wptexturize('\'qu(ot)ed\''));
67
        $this->assertEquals('“qu{ot}ed”', wptexturize('"qu{ot}ed"'));
68
69
        $this->assertEquals(' ‘test’s quoted’ ', wptexturize(' \'test\'s quoted\' '));
70
        $this->assertEquals(' “test’s quoted” ', wptexturize(' "test\'s quoted" '));
71
    }
72
73
    /**