Skip to content

Commit

Permalink
fix: phpunit tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
HardeepAsrani committed Aug 14, 2024
1 parent 3d3871a commit 74d60c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ assets/js/build
languages/neve-fse.pot

.DS_Store
.phpunit.result.cache
5 changes: 5 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit 74d60c8

Please sign in to comment.