| 
                                
                                    @@ 827-837 (lines=11) @@
                                 | 
                            
                                                            
                                    | 824 | 
                                     | 
                                        /**  | 
                                
                                                            
                                    | 825 | 
                                     | 
                                         * Test various conditions that can/should prevent autoptimize from buffering content.  | 
                                
                                                            
                                    | 826 | 
                                     | 
                                         */  | 
                                
                                                            
                                    | 827 | 
                                     | 
                                        public function test_skips_buffering_when_ao_noptimize_filter_is_true()  | 
                                
                                                            
                                    | 828 | 
                                     | 
                                        { | 
                                
                                                            
                                    | 829 | 
                                     | 
                                            // True => disable autoptimize.  | 
                                
                                                            
                                    | 830 | 
                                     | 
                                            add_filter( 'autoptimize_filter_noptimize', '__return_true' );  | 
                                
                                                            
                                    | 831 | 
                                     | 
                                     | 
                                
                                                            
                                    | 832 | 
                                     | 
                                            // Buffering should not run due to the above filter.  | 
                                
                                                            
                                    | 833 | 
                                     | 
                                            $expected = false;  | 
                                
                                                            
                                    | 834 | 
                                     | 
                                            $actual   = $this->ao->should_buffer( $doing_tests = true );  | 
                                
                                                            
                                    | 835 | 
                                     | 
                                     | 
                                
                                                            
                                    | 836 | 
                                     | 
                                            $this->assertEquals( $expected, $actual );  | 
                                
                                                            
                                    | 837 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 838 | 
                                     | 
                                     | 
                                
                                                            
                                    | 839 | 
                                     | 
                                        public function test_does_buffering_when_ao_noptimize_filter_is_false()  | 
                                
                                                            
                                    | 840 | 
                                     | 
                                        { | 
                                
                                                                                
                                 | 
                                
                                    @@ 839-849 (lines=11) @@
                                 | 
                            
                                                            
                                    | 836 | 
                                     | 
                                            $this->assertEquals( $expected, $actual );  | 
                                
                                                            
                                    | 837 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 838 | 
                                     | 
                                     | 
                                
                                                            
                                    | 839 | 
                                     | 
                                        public function test_does_buffering_when_ao_noptimize_filter_is_false()  | 
                                
                                                            
                                    | 840 | 
                                     | 
                                        { | 
                                
                                                            
                                    | 841 | 
                                     | 
                                            // False => disable noptimize, aka, run normally (weird, yes...).  | 
                                
                                                            
                                    | 842 | 
                                     | 
                                            add_filter( 'autoptimize_filter_noptimize', '__return_false' );  | 
                                
                                                            
                                    | 843 | 
                                     | 
                                     | 
                                
                                                            
                                    | 844 | 
                                     | 
                                            // Buffering should run because of above.  | 
                                
                                                            
                                    | 845 | 
                                     | 
                                            $expected = true;  | 
                                
                                                            
                                    | 846 | 
                                     | 
                                            $actual   = $this->ao->should_buffer( $doing_tests = true );  | 
                                
                                                            
                                    | 847 | 
                                     | 
                                     | 
                                
                                                            
                                    | 848 | 
                                     | 
                                            $this->assertEquals( $expected, $actual );  | 
                                
                                                            
                                    | 849 | 
                                     | 
                                        }  | 
                                
                                                            
                                    | 850 | 
                                     | 
                                     | 
                                
                                                            
                                    | 851 | 
                                     | 
                                        public function test_ignores_ao_noptimize_qs_when_instructed()  | 
                                
                                                            
                                    | 852 | 
                                     | 
                                        { |