diff --git a/.gitignore b/.gitignore index fab41ab..48ff83e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ assets/js/build languages/neve-fse.pot .DS_Store +.phpunit.result.cache diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6f688bf..cf809b1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,6 +8,11 @@ define( 'NEVE_FSE_IGNORE_SOURCE_CHECK', true ); $_tests_dir = getenv( 'WP_TESTS_DIR' ); + +if ( class_exists( '\Yoast\PHPUnitPolyfills\Autoload' ) === false ) { + require_once dirname( dirname( __FILE__ ) ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php'; +} + if ( ! $_tests_dir ) { $_tests_dir = '/tmp/wordpress-tests-lib'; }