_manually_load_plugin()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
/**
3
 * PHPUnit bootstrap file
4
 *
5
 * @package Simple_Featured_Image_Column
6
 */
7
8
$_tests_dir = getenv('WP_TESTS_DIR');
9
if (!$_tests_dir) {
10
	$_tests_dir = '/tmp/wordpress-tests-lib';
11
}
12
if (!file_exists($_tests_dir.'/includes/functions.php')) {
13
	echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?";
14
	exit(1);
15
}
16
17
// Give access to tests_add_filter() function.
18
require_once $_tests_dir.'/includes/functions.php';
19
20
/**
21
 * Manually load the plugin being tested.
22
 */
23
function _manually_load_plugin() {
24
	require dirname(__DIR__).'/src/class-simple-featured-image-column.php';
25
}
26
/** @scrutinizer ignore-call */
27
tests_add_filter('muplugins_loaded', '_manually_load_plugin');
28
29
// Start up the WP testing environment.
30
require $_tests_dir.'/includes/bootstrap.php';
31