summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-09-05 15:02:49 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-09-05 15:02:49 +0200
commit30e7ddc5766aed311c7ea5571e63ae54386b3af1 (patch)
tree409926d940253c743ca21143fefd2cd91ed69d12 /tests
parent20a05190275d3dce43061fad1d30f3d4847c8f1f (diff)
downloadgigologadmin-30e7ddc5766aed311c7ea5571e63ae54386b3af1.tar.gz
gigologadmin-30e7ddc5766aed311c7ea5571e63ae54386b3af1.tar.bz2
gigologadmin-30e7ddc5766aed311c7ea5571e63ae54386b3af1.zip
Fix tests.
Since the plugin only should load on the admin side, set the WP_ADMIN constant before loading it in the tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/bootstrap.php1
1 files changed, 1 insertions, 0 deletions
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' );