Set PHPUNIT polyfills

This commit is contained in:
Claudio Sanches 2021-08-11 10:20:51 -03:00
parent d266f1c913
commit 9c19fb8f7b
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,12 @@ class WC_Unit_Tests_Bootstrap {
// install WC. // install WC.
tests_add_filter( 'setup_theme', array( $this, 'install_wc' ) ); tests_add_filter( 'setup_theme', array( $this, 'install_wc' ) );
/*
* Load PHPUnit Polyfills for the WP testing suite.
* @see https://github.com/WordPress/wordpress-develop/pull/1563/
*/
define( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH', __DIR__ . '/../vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php' );
// load the WP testing environment. // load the WP testing environment.
require_once $this->wp_tests_dir . '/includes/bootstrap.php'; require_once $this->wp_tests_dir . '/includes/bootstrap.php';