PluginProbe
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.5.6
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.5.6
4.7.2 4.7.1 trunk 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.11.1 3.11.2 3.11.3 3.2.0 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 All 92 releases
cookiebot / tests / bootstrap.php

bootstrap.php in Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode 4.5.6, at 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 namespace cybot\cookiebot\tests;
4
5 /**
6 * PHPUnit bootstrap file.
7 *
8 * @package Cookiebot
9 */
10
11 require_once __DIR__ . '/../vendor/autoload.php';
12 require_once __DIR__ . '/./helpers.php';
13 require_once __DIR__ . '/../src/addons/addons.php';
14 require_once __DIR__ . '/../src/lib/helper.php';
15
16 $cybot_cookiebot_tests_dir = getenv( 'WP_TESTS_DIR' );
17
18 if ( ! $cybot_cookiebot_tests_dir ) {
19 $cybot_cookiebot_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib';
20 }
21
22 if ( ! file_exists( "{$cybot_cookiebot_tests_dir}/includes/functions.php" ) ) {
23 echo "Could not find {$cybot_cookiebot_tests_dir}/includes/functions.php, have you run bin/install-wp-tests.sh ?" . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
24 exit( 1 );
25 }
26
27 // Give access to tests_add_filter() function.
28 require_once "{$cybot_cookiebot_tests_dir}/includes/functions.php";
29
30 tests_add_filter(
31 'muplugins_loaded',
32 function () {
33 require_once dirname( dirname( __FILE__ ) ) . '/cookiebot.php';
34 }
35 );
36
37 // Start up the WP testing environment.
38 require_once "{$cybot_cookiebot_tests_dir}/includes/bootstrap.php";
39