Skip to content

Commit

Permalink
Issue #97 - update setup_test_scripts to take into account WordPress …
Browse files Browse the repository at this point in the history
…5.0 changes
  • Loading branch information
bobbingwide committed Dec 5, 2018
1 parent bccdb69 commit 6689c7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test-shortcodes-oik-jquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ function test_bw_list_wp_scripts_bb_BB() {

/**
* Similar logic to http://develop.wp-a2z.org/oik_api/tests_dependencies_scriptssetup/
* This needed updating for WordPress 5.0 - wp_default_packages is new.
*/
function setup_test_scripts() {
remove_action( 'wp_default_scripts', 'wp_default_scripts' );
$GLOBALS['wp_scripts'] = new WP_Scripts();
remove_action( 'wp_default_scripts', 'wp_default_packages' );
$scripts = new WP_Scripts();
//print_r( $scripts );
$GLOBALS['wp_scripts'] = $scripts;
//$wp_scripts->registered = array( "test1" => "script1" );
wp_register_script( "handle", "src", null, "42" );
}
Expand Down

0 comments on commit 6689c7e

Please sign in to comment.