diff --git a/bootstrap.php b/bootstrap.php index 3b92cf7..c3d83e1 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -12,3 +12,4 @@ SetEnv::setConfigFilePath(); Bootstrap::init(getenv('WP_VERSION')); +Bootstrap::requireWordPressTestEnv(); diff --git a/src/Bootstrap.php b/src/Bootstrap.php index dfa5fb4..7f7937e 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -384,7 +384,14 @@ public static function init(string $wp_version): void self::displayLine('Bye!', '👋'); self::displaySeparator(); + } + /** + * Require the WP test environment + * + * This enables us to use WordPress' built-in functions in our tests. + */ + public static function requireWordPressTestEnv(): void { require FetchWP::extractDirPath() . 'wordpress-develop-trunk/tests/phpunit/includes/functions.php';