diff --git a/tests/phpunit/tests/Plugin_Tests.php b/tests/phpunit/tests/Plugin_Tests.php index 519501e..620887b 100644 --- a/tests/phpunit/tests/Plugin_Tests.php +++ b/tests/phpunit/tests/Plugin_Tests.php @@ -77,6 +77,12 @@ public function test_fast_smooth_scroll_register_scripts_does_not_print_offset_s // Restore original `$wp_scripts`. $wp_scripts = $orig_wp_scripts; + if ( ! method_exists( $this, 'assertStringNotContainsString' ) ) { + $this->assertFalse( strpos( $polyfill_inline_script, 'var fastSmoothScrollOffset = ' ) ); + $this->assertFalse( strpos( $polyfills_inline_script, 'var fastSmoothScrollOffset = ' ) ); + return; + } + $this->assertStringNotContainsString( 'var fastSmoothScrollOffset = ', $polyfill_inline_script ); $this->assertStringNotContainsString( 'var fastSmoothScrollOffset = ', $polyfills_inline_script ); }