diff --git a/features/plugin-activate.feature b/features/plugin-activate.feature index 9c474244..a479e801 100644 --- a/features/plugin-activate.feature +++ b/features/plugin-activate.feature @@ -154,3 +154,26 @@ Feature: Activate WordPress plugins Success: """ And the return code should be 0 + + Scenario: Activating a plugin that generates unexpected output shows the output in debug mode + Given a wp-content/plugins/output-plugin.php file: + """ + get_error_code() ) { + /** + * @var string $output + */ + $output = $result->get_error_data(); + if ( ! empty( $output ) ) { + WP_CLI::debug( "Unexpected output: {$output}", 'plugin' ); + } + } ++$errors; } else { $this->active_output( $plugin->name, $plugin->file, $network_wide, 'activate' );