Code Duplication    Length = 7-10 lines in 8 locations

tests/phpunit/tests/date/query.php 8 locations

@@ 418-424 (lines=7) @@
415
    /**
416
     * @ticket 29801
417
     */
418
    public function test_build_value_compare_between_array_with_other_than_two_items() 
419
    {
420
        $q = new WP_Date_Query(array());
421
422
        $found = $q->build_value('BETWEEN', array( 2, 3, 4 ));
423
        $this->assertFalse($found);
424
    }
425
426
    /**
427
     * @ticket 29801
@@ 429-438 (lines=10) @@
426
    /**
427
     * @ticket 29801
428
     */
429
    public function test_build_value_compare_between_incorrect_array_key() 
430
    {
431
        $q = new WP_Date_Query(array());
432
433
        $found = $q->build_value(
434
            'BETWEEN', array(
435
            2 => 4,
436
            3 => 5,
437
            ) 
438
        );
439
440
        $this->assertSame('4 AND 5', $found);
441
    }
@@ 446-452 (lines=7) @@
443
    /**
444
     * @ticket 29801
445
     */
446
    public function test_build_value_compare_between_array_contains_non_numeric() 
447
    {
448
        $q = new WP_Date_Query(array());
449
450
        $found = $q->build_value('BETWEEN', array( 2, 'foo' ));
451
        $this->assertFalse($found);
452
    }
453
454
    public function test_build_value_compare_between() 
455
    {
@@ 454-460 (lines=7) @@
451
        $this->assertFalse($found);
452
    }
453
454
    public function test_build_value_compare_between() 
455
    {
456
        $q = new WP_Date_Query(array());
457
458
        $found = $q->build_value('BETWEEN', array( 2, 3 ));
459
        $this->assertSame('2 AND 3', $found);
460
    }
461
462
    public function test_build_value_compare_not_between_single_integer() 
463
    {
@@ 484-490 (lines=7) @@
481
    /**
482
     * @ticket 29801
483
     */
484
    public function test_build_value_compare_not_between_array_with_other_than_two_items() 
485
    {
486
        $q = new WP_Date_Query(array());
487
488
        $found = $q->build_value('NOT BETWEEN', array( 2, 3, 4 ));
489
        $this->assertFalse($found);
490
    }
491
492
    /**
493
     * @ticket 29801
@@ 495-504 (lines=10) @@
492
    /**
493
     * @ticket 29801
494
     */
495
    public function test_build_value_compare_not_between_incorrect_array_key() 
496
    {
497
        $q = new WP_Date_Query(array());
498
499
        $found = $q->build_value(
500
            'NOT BETWEEN', array(
501
            2 => 4,
502
            3 => 5,
503
            ) 
504
        );
505
506
        $this->assertSame('4 AND 5', $found);
507
    }
@@ 512-518 (lines=7) @@
509
    /**
510
     * @ticket 29801
511
     */
512
    public function test_build_value_compare_not_between_array_contains_non_numeric() 
513
    {
514
        $q = new WP_Date_Query(array());
515
516
        $found = $q->build_value('NOT BETWEEN', array( 2, 'foo' ));
517
        $this->assertFalse($found);
518
    }
519
520
    public function test_build_value_compare_not_between() 
521
    {
@@ 520-526 (lines=7) @@
517
        $this->assertFalse($found);
518
    }
519
520
    public function test_build_value_compare_not_between() 
521
    {
522
        $q = new WP_Date_Query(array());
523
524
        $found = $q->build_value('NOT BETWEEN', array( 2, 3 ));
525
        $this->assertSame('2 AND 3', $found);
526
    }
527
528
    public function test_build_value_compare_default_value_integer() 
529
    {