Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Dependencies: Require the class in Core's bootstrap, but just don't initialize it during tests. #16

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wp-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@

$GLOBALS['wp_plugin_paths'] = array();

// Load and initialize WP_Plugin_Dendencies.
// Load and initialize WP_Plugin_Dependencies.
require_once ABSPATH . WPINC . '/class-wp-plugin-dependencies.php';
if ( ! defined( 'WP_RUN_CORE_TESTS' ) ) {
require_once ABSPATH . WPINC . '/class-wp-plugin-dependencies.php';
WP_Plugin_Dependencies::initialize();
}

Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/admin/plugin-dependencies/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ abstract class WP_PluginDependencies_UnitTestCase extends WP_UnitTestCase {
public static function set_up_before_class() {
parent::set_up_before_class();

require_once ABSPATH . WPINC . '/class-wp-plugin-dependencies.php';
self::$instance = new WP_Plugin_Dependencies();
}

Expand Down