PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.11.0
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.11.0
3.13.4 3.13.3 3.13.2 3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 All 262 releases
wpfunnels / vendor / deliciousbrains / wp-background-processing / tests / bootstrap.php

bootstrap.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.11.0, at vendor/deliciousbrains/wp-background-processing/tests/bootstrap.php

39 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * PHPUnit bootstrap file.
4 *
5 * @package Wp_Background_Processing
6 */
7
8 $_tests_dir = getenv( 'WP_TESTS_DIR' );
9
10 if ( ! $_tests_dir ) {
11 $_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
12 }
13
14 // Forward custom PHPUnit Polyfills configuration to PHPUnit bootstrap file.
15 $_phpunit_polyfills_path = getenv( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH' );
16 if ( false !== $_phpunit_polyfills_path ) {
17 define( 'WP_TESTS_PHPUNIT_POLYFILLS_PATH', $_phpunit_polyfills_path );
18 }
19
20 if ( ! file_exists( "{$_tests_dir}/includes/functions.php" ) ) {
21 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
22 exit( 1 );
23 }
24
25 // Give access to tests_add_filter() function.
26 require_once "{$_tests_dir}/includes/functions.php";
27
28 /**
29 * Manually load the plugin being tested.
30 */
31 function _manually_load_plugin() {
32 require dirname( dirname( __FILE__ ) ) . '/wp-background-processing.php';
33 }
34
35 tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
36
37 // Start up the WP testing environment.
38 require "{$_tests_dir}/includes/bootstrap.php";
39