diff --git a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php index e9349190ebdb2..8d190a93aafc1 100644 --- a/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php +++ b/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php @@ -211,6 +211,17 @@ public function test_config_not_printed_when_empty() { $this->expectOutputString( '' ); } + /** + * Test that the deprecated register_script_modules method is deprecated but does not throw. + * + * @ticket 60647 + * + * @expectedDeprecated WP_Interactivity_API::register_script_modules + */ + public function test_register_script_modules_deprecated() { + $this->interactivity->register_script_modules(); + } + /** * Sets up an activity, runs an optional callback, and returns a MockAction for inspection. * @@ -221,7 +232,6 @@ public function test_config_not_printed_when_empty() { */ private function get_script_data_filter_result( ?Closure $callback = null ): MockAction { $this->interactivity->add_hooks(); - $this->interactivity->register_script_modules(); wp_enqueue_script_module( '@wordpress/interactivity' ); $filter = new MockAction(); add_filter( 'script_module_data_@wordpress/interactivity', array( $filter, 'filter' ) );