Set PHPUNIT polyfills
This commit is contained in:
parent
d266f1c913
commit
9c19fb8f7b
|
@ -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';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue