Code Duplication    Length = 11-11 lines in 2 locations

tests/phpunit/tests/query/conditionals.php 2 locations

@@ 219-229 (lines=11) @@
216
    }
217
218
    // '(about)/page/?([0-9]{1,})/?$' => 'index.php?pagename=$matches[1]&paged=$matches[2]'
219
    function test_page_page_2() 
220
    {
221
        $page_id = self::factory()->post->create(array( 'post_type' => 'page', 'post_title' => 'about', 'post_content' => 'Page 1 <!--nextpage--> Page 2' ));
222
        $this->go_to("/about/page/2/");
223
224
        // make sure the correct wp_query flags are set
225
        $this->assertQueryTrue('is_page', 'is_singular', 'is_paged');
226
227
        // make sure the correct page was fetched
228
        global $wp_query;
229
        $this->assertEquals($page_id, $wp_query->get_queried_object()->ID);
230
    }
231
232
    // '(about)/page/?([0-9]{1,})/?$' => 'index.php?pagename=$matches[1]&paged=$matches[2]'
@@ 233-243 (lines=11) @@
230
    }
231
232
    // '(about)/page/?([0-9]{1,})/?$' => 'index.php?pagename=$matches[1]&paged=$matches[2]'
233
    function test_page_page_2_no_slash() 
234
    {
235
        $page_id = self::factory()->post->create(array( 'post_type' => 'page', 'post_title' => 'about', 'post_content' => 'Page 1 <!--nextpage--> Page 2' ));
236
        $this->go_to("/about/page2/");
237
238
        // make sure the correct wp_query flags are set
239
        $this->assertQueryTrue('is_page', 'is_singular', 'is_paged');
240
241
        // make sure the correct page was fetched
242
        global $wp_query;
243
        $this->assertEquals($page_id, $wp_query->get_queried_object()->ID);
244
    }
245
246
    // '(about)(/[0-9]+)?/?$' => 'index.php?pagename=$matches[1]&page=$matches[2]'