Skip to content

Commit

Permalink
Remove not needed setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravobernal committed Jan 30, 2024
1 parent ad96c51 commit 0ea9316
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/phpunit/tests/script-modules/wpScriptModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*/
class Tests_WpScriptModules extends WP_UnitTestCase {

private $old_wp_scripts;

/**
* Instance of WP_Script_Modules.
*
Expand All @@ -27,23 +25,10 @@ class Tests_WpScriptModules extends WP_UnitTestCase {
*/
public function set_up() {
parent::set_up();

// Set up the WP_Scripts instance.
$this->old_wp_scripts = isset( $GLOBALS['wp_scripts'] ) ? $GLOBALS['wp_scripts'] : null;
remove_action( 'wp_default_scripts', 'wp_default_scripts' );
$GLOBALS['wp_scripts'] = new WP_Scripts();
$GLOBALS['wp_scripts']->default_version = get_bloginfo( 'version' );

// Set up the WP_Script_Modules instance.
$this->script_modules = new WP_Script_Modules();
}

public function tear_down() {
$GLOBALS['wp_scripts'] = $this->old_wp_scripts;
add_action( 'wp_default_scripts', 'wp_default_scripts' );
parent::tear_down();
}

/**
* Gets a list of the enqueued script modules.
*
Expand Down

0 comments on commit 0ea9316

Please sign in to comment.