Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

Update bootstrap.php to support themes #255

@kasparsd

Description

@kasparsd

We should update phpunit-plugin-bootstrap.php to support theme THEME_GIT_PLUGIN_DEPENDENCIES since #150 was merged. Similar to how we activate WP_TEST_ACTIVATED_PLUGINS:

function xwp_filter_active_plugins_for_phpunit( $active_plugins ) {
$forced_active_plugins = array();
if ( file_exists( WP_CONTENT_DIR . '/themes/vip/plugins/vip-init.php' ) && defined( 'WP_TEST_VIP_QUICKSTART_ACTIVATED_PLUGINS' ) ) {
$forced_active_plugins = preg_split( '/\s*,\s*/', WP_TEST_VIP_QUICKSTART_ACTIVATED_PLUGINS );
} else if ( defined( 'WP_TEST_ACTIVATED_PLUGINS' ) ) {
$forced_active_plugins = preg_split( '/\s*,\s*/', WP_TEST_ACTIVATED_PLUGINS );
}
if ( ! empty( $forced_active_plugins ) ) {
foreach ( $forced_active_plugins as $forced_active_plugin ) {
$active_plugins[] = $forced_active_plugin;
}
}
return $active_plugins;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions