buddypress/tests/phpunit/bootstrap.php
Mathieu Viet 9bd0d0aa69 Update wp-env to version 9.0.0 & adapt the PHPUnit tests suite to it
- Update PHPUnit related npm scripts for `wp-env` 9.0.0.
- Create `test_multi`: a new composer script to run Multisite Unit tests.
- Remove our composer dependency to `wp-phpunit/wp-phpunit`.
- Update the PHPUnit tests suite so that it stops using `wp-phpunit/wp-phpunit` when it's within the `wp-env` context.
- Remove no more used PHPUnit specific configuration files.

Fixes #9053
Closes https://github.com/buddypress/buddypress/pull/211



git-svn-id: https://buddypress.svn.wordpress.org/trunk@13720 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2024-01-31 20:09:06 +00:00

21 lines
717 B
PHP

<?php
const WP_TESTS_PHPUNIT_POLYFILLS_PATH = __DIR__ . '/../../vendor/yoast/phpunit-polyfills';
require( dirname( __FILE__ ) . '/includes/define-constants.php' );
if ( ! file_exists( WP_TESTS_DIR . '/includes/functions.php' ) ) {
die( "The WordPress PHPUnit test suite could not be found.\n" );
}
require_once WP_TESTS_DIR . '/includes/functions.php';
function _install_and_load_buddypress() {
require BP_TESTS_DIR . '/includes/loader.php';
}
tests_add_filter( 'muplugins_loaded', '_install_and_load_buddypress' );
require WP_TESTS_DIR . '/includes/bootstrap.php';
// Load the BP-specific testing tools
require BP_TESTS_DIR . '/includes/testcase.php';
require BP_TESTS_DIR . '/includes/testcase-emails.php';