PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / extra / wpmudev-analytics / tests / bootstrap.php

bootstrap.php in Defender Security – Malware Scanner, Login Security & Firewall 6.3.0, at extra/wpmudev-analytics/tests/bootstrap.php

36 lines 1.0 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_Smush_Pro
6 */
7
8 require_once dirname( __DIR__ ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
9
10 require_once dirname( __DIR__ ) . '/autoload.php';
11
12 $_tests_dir = getenv( 'WP_TESTS_DIR' );
13
14 if ( ! $_tests_dir ) {
15 $_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
16 }
17
18 if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) {
19 echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; // WPCS: XSS ok.
20 exit( 1 );
21 }
22
23 $content_dir = getenv( 'WP_CONTENT_DIR' );
24 if ( ! $content_dir ) {
25 echo "WP_CONTENT_DIR constant needs to be defined as an environment variable" . PHP_EOL; // WPCS: XSS ok.
26 exit( 1 );
27 }
28
29 // Give access to tests_add_filter() function.
30 /* @noinspection PhpIncludeInspection */
31 require_once $_tests_dir . '/includes/functions.php';
32
33 // Start up the WP testing environment.
34 /* @noinspection PhpIncludeInspection */
35 require $_tests_dir . '/includes/bootstrap.php';
36