diff --git a/qit b/qit index 6948e5c6..2da297c8 100755 Binary files a/qit and b/qit differ diff --git a/src/src/Commands/CustomTests/RunE2ECommand.php b/src/src/Commands/CustomTests/RunE2ECommand.php index 27e02c3f..a7c31c3c 100644 --- a/src/src/Commands/CustomTests/RunE2ECommand.php +++ b/src/src/Commands/CustomTests/RunE2ECommand.php @@ -87,17 +87,17 @@ protected function configure() { // Extension slug/ID. $this->addArgument( - 'path', + 'test-path', InputArgument::OPTIONAL, 'Path to your E2E tests (Optional, if not set, it will try to download your custom tests that you have previously uploaded to QIT)' ); // If testing a development build, set this. $this->addOption( - 'zip', + 'sut', null, InputOption::VALUE_OPTIONAL, - 'If testing a development build, set this to the path of the zip file.', + 'Path to the development build of the extension you are testing. Accepts a WordPress plugin or theme directory, or a WordPress plugin or theme zip file.', null ); @@ -214,23 +214,23 @@ protected function execute( InputInterface $input, OutputInterface $output ): in } // Local ZIP build for the SUT. - $zip = $input->getOption( 'zip' ); + $sut_override = $input->getOption( 'sut' ); - if ( ! empty( $zip ) ) { + if ( ! empty( $sut_override ) ) { if ( empty( $woo_extension ) ) { - $this->output->writeln( 'Cannot set the "zip" option without setting the "woo_extension" argument.' ); + $this->output->writeln( 'Cannot set the "sut" option without setting the "woo_extension" argument.' ); return Command::INVALID; } - putenv( sprintf( 'QIT_SUT_ZIP=%s', $zip ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv + putenv( sprintf( 'QIT_SUT_OVERRIDE=%s', $sut_override ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv } // Test Path, if local. - $path = $input->getArgument( 'path' ); + $test_path = $input->getArgument( 'test-path' ); - if ( ! empty( $path ) && file_exists( $path ) && ! empty( $woo_extension ) ) { - putenv( sprintf( 'QIT_CUSTOM_TESTS_PATH=%s|%s', $woo_extension, $path ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv + if ( ! empty( $test_path ) && file_exists( $test_path ) && ! empty( $woo_extension ) ) { + putenv( sprintf( 'QIT_CUSTOM_TESTS_PATH=%s|%s', $woo_extension, $test_path ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv } $compatibility = $other_options['compatibility']; diff --git a/src/src/Environment/ExtensionDownload/ExtensionDownloader.php b/src/src/Environment/ExtensionDownload/ExtensionDownloader.php index d87896cb..98c8bc4d 100644 --- a/src/src/Environment/ExtensionDownload/ExtensionDownloader.php +++ b/src/src/Environment/ExtensionDownload/ExtensionDownloader.php @@ -83,7 +83,7 @@ public function download( EnvInfo $env_info, string $cache_dir, array $plugins = // Set it as read-only to prevent dev messing up their local copy inadvertently (default behavior). // Inform the user about the read-only mapping. - $this->output->writeln( "Notice: Mapping '{$e->type}s/{$e->extension_identifier}' as read-only to protect your local copy." ); + $this->output->writeln( "Info: Mapping '{$e->type}s/{$e->extension_identifier}' as read-only to protect your local copy." ); // Add a read-only volume bind. $env_info->volumes[ "/var/www/html/wp-content/{$e->type}s/{$e->extension_identifier}:ro" ] = $e->path; @@ -126,13 +126,13 @@ public function categorize_extensions( array $plugins, array $themes ): array { } if ( getenv( 'QIT_SUT' ) === $ext->extension_identifier ) { - if ( getenv( 'QIT_SUT_ZIP' ) ) { + if ( getenv( 'QIT_SUT_OVERRIDE' ) ) { static $printed = false; if ( ! $printed ) { - $this->output->writeln( sprintf( 'Using local development build for %s.', $ext->extension_identifier ) ); + $this->output->writeln( sprintf( 'Using local build for %s.', $ext->extension_identifier ) ); $printed = true; } - $ext->path = getenv( 'QIT_SUT_ZIP' ); + $ext->path = getenv( 'QIT_SUT_OVERRIDE' ); } }