diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index 02e3ca319..fb9387877 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -209,8 +209,9 @@ private static function get_behat_internal_variables() { } $variables = [ - 'SRC_DIR' => realpath( dirname( dirname( __DIR__ ) ) ), 'FRAMEWORK_ROOT' => realpath( $framework_root ), + 'SRC_DIR' => realpath( dirname( dirname( __DIR__ ) ) ), + 'PROJECT_DIR' => realpath( dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ), ]; return $variables; diff --git a/features/steps/given.php b/features/steps/given.php index 97ce11ec8..ef0425a18 100644 --- a/features/steps/given.php +++ b/features/steps/given.php @@ -134,6 +134,8 @@ function ( $world, $type = 'subdirectory' ) { '/^these installed and active plugins:$/', function( $world, $stream ) { $plugins = implode( ' ', array_map( 'trim', explode( PHP_EOL, (string) $stream ) ) ); + $plugins = $world->replace_variables( $plugins ); + $world->proc( "wp plugin install $plugins --activate" )->run_check(); } );