From e939c870ce17eade0058ce6b63cc41d7a2071fd1 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 11 Jun 2019 11:59:49 +0100 Subject: [PATCH] WP_TESTS_DIR --- unit-tests/Bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit-tests/Bootstrap.php b/unit-tests/Bootstrap.php index a533f69b181..e5ce59a1ba3 100755 --- a/unit-tests/Bootstrap.php +++ b/unit-tests/Bootstrap.php @@ -56,7 +56,7 @@ class Bootstrap { $this->plugin_dir = dirname( $this->tests_dir ); $this->plugins_dir = dirname( $this->plugin_dir ); $this->wc_tests_dir = $this->plugins_dir . '/woocommerce/tests'; - $this->wp_tests_dir = getenv( 'WP_TESTS_DIR' ); + $this->wp_tests_dir = getenv( 'WP_TESTS_DIR' ) ? getenv( 'WP_TESTS_DIR' ) : rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib'; $this->setup_hooks(); $this->load_framework();