# cookiebot/3.4.0/addons/tests/bootstrap.php

Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA &amp; Google Consent Mode, version 3.4.0. 38 lines.

- Page: https://pluginprobe.com/plugins/cookiebot/3.4.0/code/addons/tests/bootstrap.php
- Raw: https://pluginprobe.com/plugins/cookiebot/3.4.0/raw/addons/tests/bootstrap.php
- Modified: 2018-07-31T11:41:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cookiebot/3.4.0/code/addons/tests/bootstrap.php#L10-L20`.

```php
<?php
/**
 * PHPUnit bootstrap file
 *
 * @package Klasse_Plugin_Boilerplate
 */
//
$_tests_dir = getenv( 'WP_TESTS_DIR' );

if ( ! $_tests_dir ) {
	$_tests_dir = '/tmp/wordpress-tests-lib';
}

define( 'PLUGIN_NAME', 'cookiebot-addons.php' );
define( 'PLUGIN_FOLDER', basename( dirname( __DIR__ ) ) );
define( 'PLUGIN_PATH', PLUGIN_FOLDER . '/' . PLUGIN_NAME );

// Activates this plugin in WordPress so it can be tested.
$GLOBALS['wp_tests_options'] = array(
	'active_plugins' => array( PLUGIN_PATH ),
);

// Give access to tests_add_filter() function.
require_once $_tests_dir . '/includes/functions.php';

/**
 * Manually load the plugin being tested.
 */
function _manually_load_plugin() {
	// plugin
	require dirname( dirname( __FILE__ ) ) . '/cookiebot-addons-init.php';
}

tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );

// Start up the WP testing environment.
require $_tests_dir . '/includes/bootstrap.php';

```
