We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 894c765 + f8a0544 commit da807cfCopy full SHA for da807cf
tests/bootstrap.php
@@ -6,9 +6,19 @@
6
? WP_CLI_TESTS_ROOT . '/vendor'
7
: WP_CLI_TESTS_ROOT . '/../..'
8
);
9
-define( 'WP_CLI_ROOT', VENDOR_DIR . '/wp-cli/wp-cli' );
10
define( 'PACKAGE_ROOT', VENDOR_DIR . '/..' );
11
-define( 'WP_CLI_VERSION', trim( file_get_contents( WP_CLI_ROOT . '/VERSION' ) ) );
+
+define( 'WP_CLI_ROOT',
12
+ is_readable( PACKAGE_ROOT . '/VERSION' )
13
+ ? PACKAGE_ROOT
14
+ : VENDOR_DIR . '/wp-cli/wp-cli'
15
+);
16
17
+define( 'WP_CLI_VERSION',
18
+ is_readable( WP_CLI_ROOT . '/VERSION' )
19
+ ? trim( file_get_contents( WP_CLI_ROOT . '/VERSION' ) )
20
+ : define( 'WP_CLI_VERSION', '2.x.x' )
21
22
23
/**
24
* Compatibility with PHPUnit 6+
0 commit comments