Code Duplication    Length = 21-21 lines in 3 locations

tests/phpunit/tests/feed/rss2.php 3 locations

@@ 311-331 (lines=21) @@
308
    *
309
    * @ticket 30210
310
    */
311
    function test_valid_taxonomy_feed_endpoint() 
312
    {
313
        // An example of an valid taxonomy feed endpoint.
314
        $this->go_to('category/foo/feed/');
315
316
        // Verify the query object is a feed.
317
        $this->assertQueryTrue('is_feed', 'is_archive', 'is_category');
318
319
        // Queries performed on valid feed endpoints should contain posts.
320
        $this->assertTrue(have_posts());
321
322
        // Check to see if we have the expected XML output from the feed template.
323
        $feed = $this->do_rss2();
324
325
        $xml = xml_to_array($feed);
326
327
        // Get the <rss> child element of <xml>.
328
        $rss = xml_find($xml, 'rss');
329
330
        // There should only be one <rss> child element.
331
        $this->assertEquals(1, count($rss));
332
    }
333
334
    /*
@@ 374-394 (lines=21) @@
371
    *
372
    * @ticket 30210
373
    */
374
    function test_valid_archive_feed_endpoint() 
375
    {
376
        // An example of an valid date archive feed endpoint.
377
        $this->go_to('2003/05/27/feed/');
378
379
        // Verify the query object is a feed.
380
        $this->assertQueryTrue('is_feed', 'is_archive', 'is_day', 'is_date');
381
382
        // Queries performed on valid feed endpoints should contain posts.
383
        $this->assertTrue(have_posts());
384
385
        // Check to see if we have the expected XML output from the feed template.
386
        $feed = $this->do_rss2();
387
388
        $xml = xml_to_array($feed);
389
390
        // Get the <rss> child element of <xml>.
391
        $rss = xml_find($xml, 'rss');
392
393
        // There should only be one <rss> child element.
394
        $this->assertEquals(1, count($rss));
395
    }
396
397
    /*
@@ 403-423 (lines=21) @@
400
    *
401
    * @ticket 30210
402
    */
403
    function test_valid_single_post_comment_feed_endpoint() 
404
    {
405
        // An example of an valid date archive feed endpoint.
406
        $this->go_to(get_post_comments_feed_link(self::$posts[0]));
407
408
        // Verify the query object is a feed.
409
        $this->assertQueryTrue('is_feed', 'is_comment_feed', 'is_single', 'is_singular');
410
411
        // Queries performed on valid feed endpoints should contain posts.
412
        $this->assertTrue(have_posts());
413
414
        // Check to see if we have the expected XML output from the feed template.
415
        $feed = $this->do_rss2();
416
417
        $xml = xml_to_array($feed);
418
419
        // Get the <rss> child element of <xml>.
420
        $rss = xml_find($xml, 'rss');
421
422
        // There should only be one <rss> child element.
423
        $this->assertEquals(1, count($rss));
424
    }
425
426
    /*