From 30e7ddc5766aed311c7ea5571e63ae54386b3af1 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 5 Sep 2021 15:02:49 +0200 Subject: Fix tests. Since the plugin only should load on the admin side, set the WP_ADMIN constant before loading it in the tests. --- tests/bootstrap.php | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b090644..c999ba1 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -30,6 +30,7 @@ require_once $_tests_dir . '/includes/functions.php'; * Manually load the plugin being tested. */ function _manually_load_plugin() { + define('WP_ADMIN', true); // We're always in admin require dirname( dirname( __FILE__ ) ) . '/giglogadmin.php'; } tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); -- cgit v1.2.3