Skip to content

Commit f2715ab

Browse files
committed
Test deprecation
1 parent d2cb41a commit f2715ab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,17 @@ public function test_config_not_printed_when_empty() {
211211
$this->expectOutputString( '' );
212212
}
213213

214+
/**
215+
* Test that the deprecated register_script_modules method is deprecated but does not throw.
216+
*
217+
* @ticket 60647
218+
*
219+
* @expectedDeprecated WP_Interactivity_API::register_script_modules
220+
*/
221+
public function test_register_script_modules_deprecated() {
222+
$this->interactivity->register_script_modules();
223+
}
224+
214225
/**
215226
* Sets up an activity, runs an optional callback, and returns a MockAction for inspection.
216227
*
@@ -221,7 +232,6 @@ public function test_config_not_printed_when_empty() {
221232
*/
222233
private function get_script_data_filter_result( ?Closure $callback = null ): MockAction {
223234
$this->interactivity->add_hooks();
224-
$this->interactivity->register_script_modules();
225235
wp_enqueue_script_module( '@wordpress/interactivity' );
226236
$filter = new MockAction();
227237
add_filter( 'script_module_data_@wordpress/interactivity', array( $filter, 'filter' ) );

0 commit comments

Comments
 (0)