Skip to content

Commit

Permalink
Set "test" action for SUT by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Apr 10, 2024
1 parent dca7af6 commit b5c48fb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/src/Commands/CustomTests/RunE2ECommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ protected function execute( InputInterface $input, OutputInterface $output ): in
}
$woo_extension = sprintf( '%s:test:%s', $woo_extension, realpath( $test ) );
}

$has_action = false;
foreach ( Extension::ACTIONS as $action ) {
if ( strpos( $woo_extension, ":$action" ) !== false ) {
$has_action = true;
break;
}
}

if ( ! $has_action ) {
$woo_extension = "$woo_extension:test";
}
if ( $input->getOption( 'testing_theme' ) === 'true' ) {
$env_up_options['--theme'][] = $woo_extension;
} else {
Expand Down

0 comments on commit b5c48fb

Please sign in to comment.