fix(tia): list the whole suite with --list-tests (#1973)

Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
This commit is contained in:
Lazizbek Ergashev
2026-11-13 17:51:51 +05:00
committed by GitHub
parent cf20587575
commit 4765bdb8d0
2 changed files with 29 additions and 1 deletions
+15 -1
View File
@@ -141,6 +141,12 @@ final class Tia implements AddsOutput, HandlesArguments, HandlesOriginalArgument
'--assignee', '--issue', '--ticket', '--pr', '--pull-request',
];
/** @var list<string> */
private const array LISTING_FLAGS = [
'--list-groups', '--list-suites', '--list-tests', '--list-tests-xml',
'--list-test-files', '--list-test-ids',
];
private const array UNSUPPORTED_OPTIONS = [
'--covers', '--uses', '--random-order-seed',
];
@@ -494,7 +500,7 @@ final class Tia implements AddsOutput, HandlesArguments, HandlesOriginalArgument
$hasExplicitPath = $this->hasExplicitPathArgument($arguments);
$partial = ! $isWorker && ($hasExplicitPath || $this->hasPartialSelection($arguments));
$disabled = $disabled || $partial;
$disabled = $disabled || $partial || $this->hasListingOption($arguments);
$mutating = self::isMutationRun($this->originalArguments);
@@ -1987,6 +1993,14 @@ final class Tia implements AddsOutput, HandlesArguments, HandlesOriginalArgument
return false;
}
/**
* @param array<int, string> $arguments
*/
private function hasListingOption(array $arguments): bool
{
return array_any(self::LISTING_FLAGS, fn (string $flag): bool => $this->hasArgument($flag, $arguments));
}
private function stoppedEarly(): bool
{
return TestResultFacade::shouldStop();