phpunit
-php behat.phar --format progress
+# Run the functional tests against the Phar file
+
+WP_CLI_BIN_DIR=/tmp/wp-cli-phar
+
+mkdir -p $WP_CLI_BIN_DIR
+php -dphar.readonly=0 utils/make-phar.php wp-cli.phar --quiet
+mv wp-cli.phar $WP_CLI_BIN_DIR/wp
+chmod +x $WP_CLI_BIN_DIR/wp
+
+WP_CLI_BIN_DIR=$WP_CLI_BIN_DIR php behat.phar --format progress
);
// Ensure we're using the expected `wp` binary
+ $bin_dir = getenv( 'WP_CLI_BIN_DIR' ) ?: realpath( __DIR__ . "/../../bin" );
+
$proc = proc_open( $this->command, $descriptors, $pipes, $cwd, array(
- 'PATH' => realpath( __DIR__ . "/../../bin" ) . ':' . getenv( 'PATH' ),
+ 'PATH' => $bin_dir . ':' . getenv( 'PATH' ),
'BEHAT_RUN' => 1
) );