@@ -383,6 +383,7 @@ public function test_add_amp_template_filters() {
383383 * @covers AMP_Theme_Support::prepare_response()
384384 */
385385 public function test_validate_non_amp_theme () {
386+ wp ();
386387 add_filter ( 'amp_validation_error_sanitized ' , '__return_true ' );
387388 add_theme_support ( AMP_Theme_Support::SLUG );
388389 AMP_Theme_Support::init ();
@@ -1052,6 +1053,7 @@ public function test_dequeue_customize_preview_scripts() {
10521053 * @covers AMP_Theme_Support::finish_output_buffering()
10531054 */
10541055 public function test_start_output_buffering () {
1056+ wp ();
10551057 if ( ! function_exists ( 'newrelic_disable_autorum ' ) ) {
10561058 /**
10571059 * Define newrelic_disable_autorum to allow passing line.
@@ -1079,6 +1081,7 @@ function newrelic_disable_autorum() {
10791081 * @covers AMP_Theme_Support::is_output_buffering()
10801082 */
10811083 public function test_finish_output_buffering () {
1084+ wp ();
10821085 add_filter ( 'amp_validation_error_sanitized ' , '__return_true ' );
10831086 add_theme_support ( AMP_Theme_Support::SLUG );
10841087 AMP_Theme_Support::init ();
@@ -1127,6 +1130,7 @@ public function test_finish_output_buffering() {
11271130 * @covers AMP_Theme_Support::filter_customize_partial_render()
11281131 */
11291132 public function test_filter_customize_partial_render () {
1133+ wp ();
11301134 add_filter ( 'amp_validation_error_sanitized ' , '__return_true ' );
11311135 add_theme_support ( AMP_Theme_Support::SLUG );
11321136 AMP_Theme_Support::init ();
@@ -1175,6 +1179,7 @@ protected function get_etag_header_value( $headers ) {
11751179 * @covers \amp_render_scripts()
11761180 */
11771181 public function test_prepare_response () {
1182+ wp ();
11781183 $ prepare_response_args = array (
11791184 'enable_response_caching ' => false ,
11801185 );
@@ -1337,6 +1342,7 @@ public function test_prepare_response() {
13371342 * @covers AMP_Theme_Support::prepare_response()
13381343 */
13391344 public function test_prepare_response_native_mode_non_amp () {
1345+ wp ();
13401346 $ original_html = $ this ->get_original_html ();
13411347 add_filter ( 'amp_validation_error_sanitized ' , '__return_false ' ); // For testing purpose only. This should not normally be done.
13421348
@@ -1351,6 +1357,7 @@ public function test_prepare_response_native_mode_non_amp() {
13511357 * Test post-processor cache effectiveness in AMP_Theme_Support::prepare_response().
13521358 */
13531359 public function test_post_processor_cache_effectiveness () {
1360+ wp ();
13541361 $ original_html = $ this ->get_original_html ();
13551362 $ args = array ( 'enable_response_caching ' => true );
13561363 wp_using_ext_object_cache ( true ); // turn on external object cache flag.
@@ -1508,6 +1515,7 @@ private function reset_post_processor_cache_effectiveness() {
15081515 * @covers AMP_Theme_Support::prepare_response()
15091516 */
15101517 public function test_prepare_response_bad_html () {
1518+ wp ();
15111519 add_filter ( 'amp_validation_error_sanitized ' , '__return_true ' );
15121520 add_theme_support ( AMP_Theme_Support::SLUG );
15131521 AMP_Theme_Support::init ();
@@ -1533,6 +1541,7 @@ public function test_prepare_response_bad_html() {
15331541 * @covers AMP_Theme_Support::prepare_response()
15341542 */
15351543 public function test_prepare_response_to_add_html5_doctype_and_amp_attribute () {
1544+ wp ();
15361545 add_filter ( 'amp_validation_error_sanitized ' , '__return_true ' );
15371546 add_theme_support ( AMP_Theme_Support::SLUG );
15381547 AMP_Theme_Support::init ();
0 commit comments