Code Duplication    Length = 22-22 lines in 2 locations

tests/phpunit/tests/rest-api/rest-attachments-controller.php 1 location

@@ 1078-1099 (lines=22) @@
1075
        }
1076
    }
1077
1078
    public function test_attachment_roundtrip_as_superadmin_unfiltered_html() 
1079
    {
1080
        wp_set_current_user(self::$superadmin_id);
1081
        $this->assertTrue(current_user_can('unfiltered_html'));
1082
        $this->verify_attachment_roundtrip(
1083
            array(
1084
            'title'       => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1085
            'description' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1086
            'caption'     => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1087
            ), array(
1088
            'title' => array(
1089
            'raw'      => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1090
            'rendered' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1091
            ),
1092
            'description' => array(
1093
            'raw'      => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1094
            'rendered' => "<div>div</div>\n<p> <strong>strong</strong> <script>oh noes</script></p>",
1095
            ),
1096
            'caption' => array(
1097
            'raw'      => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
1098
            'rendered' => "<div>div</div>\n<p> <strong>strong</strong> <script>oh noes</script></p>",
1099
            ),
1100
            ) 
1101
        );
1102
    }

tests/phpunit/tests/rest-api/rest-posts-controller.php 1 location

@@ 2757-2778 (lines=22) @@
2754
        }
2755
    }
2756
2757
    public function test_post_roundtrip_as_superadmin_unfiltered_html() 
2758
    {
2759
        wp_set_current_user(self::$superadmin_id);
2760
        $this->assertTrue(current_user_can('unfiltered_html'));
2761
        $this->verify_post_roundtrip(
2762
            array(
2763
            'title'   => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2764
            'content' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2765
            'excerpt' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2766
            ), array(
2767
            'title' => array(
2768
            'raw'      => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2769
            'rendered' => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2770
            ),
2771
            'content' => array(
2772
            'raw'      => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2773
            'rendered' => "<div>div</div>\n<p> <strong>strong</strong> <script>oh noes</script></p>",
2774
            ),
2775
            'excerpt' => array(
2776
            'raw'      => '<div>div</div> <strong>strong</strong> <script>oh noes</script>',
2777
            'rendered' => "<div>div</div>\n<p> <strong>strong</strong> <script>oh noes</script></p>",
2778
            ),
2779
            ) 
2780
        );
2781
    }