Code Duplication    Length = 11-11 lines in 2 locations

tests/test-ao.php 2 locations

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