Skip to content

Commit 9f63e52

Browse files
committed
Forward PHPUnit Polyfills path constant to bootstrap file
1 parent 6d73d4e commit 9f63e52

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

templates/plugin-bootstrap.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ if ( ! $_tests_dir ) {
1616
$_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
1717
}
1818

19+
// Forward custom PHPUnit Polyfills configuration to PHPUnit bootstrap file.
20+
$_phpunit_polyfills_path = getenv( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' );
21+
if ( false !== $_phpunit_polyfills_path ) {
22+
define( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH', $_phpunit_polyfills_path );
23+
}
24+
1925
if ( ! file_exists( "{$_tests_dir}/includes/functions.php" ) ) {
2026
echo "Could not find {$_tests_dir}/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2127
exit( 1 );

0 commit comments

Comments
 (0)