Skip to content

Commit a772f2f

Browse files
committed
Update bootstrap.php
1 parent fea567b commit a772f2f

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

phpunit/bootstrap.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<?php
22
/**
3-
* PHPUnit bootstrap file.
3+
* PHPUnit bootstrap file for WebberZone Knowledge Base.
44
*
5-
* @package Better_Search_Plugin
5+
* This file sets up the testing environment for PHPUnit.
6+
*
7+
* @package WebberZone\Knowledge_Base
68
*/
7-
require_once dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ) . '/.composer/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
9+
10+
require_once dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) . '/.composer/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
811

912
$_tests_dir = getenv( 'WP_TESTS_DIR' );
1013

@@ -27,19 +30,9 @@
2730
require_once $_tests_dir . '/includes/functions.php';
2831

2932
function _manually_load_plugin() {
30-
require dirname( dirname( __FILE__ ) ) . '/knowledgebase.php';
33+
require dirname( __DIR__ ) . '/knowledgebase.php';
3134
}
3235
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
3336

3437
// Start up the WP testing environment.
3538
require $_tests_dir . '/includes/bootstrap.php';
36-
37-
activate_plugin( 'knowledgebase/knowledgebase.php' );
38-
39-
echo "Installing Knowledge Base...\n";
40-
41-
global $wzkb_settings, $current_user;
42-
43-
wzkb_plugin_activate( true );
44-
45-
$wzkb_settings = wzkb_get_settings();

0 commit comments

Comments
 (0)