New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a test appears in multiple suites, Infection errors out #1833
Comments
I can confirm this issue. In our case we had multiple testsuites configured sharing the same directories. I think it would help to print some additional output, e.g. the used |
what do you mean by |
The issue happens within |
Perhaps it even makes more sense to move foreach (self::testCaseMapGenerator($fullyQualifiedClassName) as $queryString => $placeholder) {
$nodes = $xPath->query(sprintf($queryString, $placeholder));
if ($nodes->length !== 0) {
Assert::same($nodes->length, 1, sprintf(
'Found %d occurrences while expecting 1 when querying %s in %s',
$nodes->length,
sprintf($queryString, $placeholder),
$xPath->document->documentURI
));
break;
}
} |
A test may appear in multiple suites as a method of grouping, e.g. Unit + Functional + "Everything". When this happens, Infection errors out, and I think this was introduced in #1172
Reproducer:
Output with issue
No stacktrace here, but it pointed to https://github.com/infection/infection/blob/0.26.19/src/TestFramework/Coverage/JUnit/JUnitTestFileDataProvider.php#L84 when it printed it.
One could argue that this is a bad method for grouping tests but I'd say that it should work anyway. Thank you.
The text was updated successfully, but these errors were encountered: