Skip to content

Commit fa8ed8f

Browse files
committed
Clean up _tests_cmb2_manually_load_plugin a bit
1 parent 4c6f797 commit fa8ed8f

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

tests/bootstrap.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function _tests_cmb2_manually_load_plugin() {
4040
define( 'CMB2_WP_CONTENT', dirname( dirname( $plugin ) ) );
4141

4242
if (
43-
( $rest_api = CMB2_WP_CONTENT . '/plugins/WP-API/plugin.php' )
43+
( $rest_api = '/tmp/wordpress/wp-content/plugins/rest-api/plugin.php' )
4444
&& file_exists( $rest_api )
4545
) {
4646
require_once $rest_api;
@@ -50,17 +50,7 @@ function _tests_cmb2_manually_load_plugin() {
5050
) {
5151
require_once $rest_api;
5252
} elseif (
53-
( $rest_api = dirname( $test_root ) . '/wp-content/plugins/rest-api/plugin.php' )
54-
&& file_exists( $rest_api )
55-
) {
56-
require_once $rest_api;
57-
} elseif (
58-
( $rest_api = dirname( dirname( $test_root ) ) . '/wordpress/wp-content/plugins/rest-api/plugin.php' )
59-
&& file_exists( $rest_api )
60-
) {
61-
require_once $rest_api;
62-
} elseif (
63-
( $rest_api = '/tmp/wordpress/wp-content/plugins/rest-api/plugin.php' )
53+
( $rest_api = CMB2_WP_CONTENT . '/plugins/WP-API/plugin.php' )
6454
&& file_exists( $rest_api )
6555
) {
6656
require_once $rest_api;

0 commit comments

Comments
 (0)