Code Duplication    Length = 11-11 lines in 2 locations

tests/test-ao.php 2 locations

@@ 809-819 (lines=11) @@
806
    /**
807
     * Test various conditions that can/should prevent autoptimize from buffering content.
808
     */
809
    public function test_skips_buffering_when_ao_noptimize_filter_is_true()
810
    {
811
        // True => disable autoptimize.
812
        add_filter( 'autoptimize_filter_noptimize', '__return_true' );
813
814
        // Buffering should not run due to the above filter.
815
        $expected = false;
816
        $actual   = $this->ao->should_buffer( $doing_tests = true );
817
818
        $this->assertEquals( $expected, $actual );
819
    }
820
821
    public function test_does_buffering_when_ao_noptimize_filter_is_false()
822
    {
@@ 821-831 (lines=11) @@
818
        $this->assertEquals( $expected, $actual );
819
    }
820
821
    public function test_does_buffering_when_ao_noptimize_filter_is_false()
822
    {
823
        // False => disable noptimize, aka, run normally (weird, yes...).
824
        add_filter( 'autoptimize_filter_noptimize', '__return_false' );
825
826
        // Buffering should run because of above.
827
        $expected = true;
828
        $actual   = $this->ao->should_buffer( $doing_tests = true );
829
830
        $this->assertEquals( $expected, $actual );
831
    }
832
833
    public function test_ignores_ao_noptimize_qs_when_instructed()
834
    {