PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 2.3.3
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v2.3.3
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / vendor / deliciousbrains / wp-background-processing / tests / bootstrap.php

bootstrap.php in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 2.3.3, 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