feat(testing): add ExpectTestStatus, ExpectAssertionsCount, ExpectTestResultAttribute (#36) #904
infection.yml
on: pull_request
Matrix: infection-phpunit
Matrix: infection
Annotations
22 warnings
|
Infection (PHPUnit mirror) PHP8.4
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L151
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
summary: $summary,
);
- $dispatcher->dispatch(new WorkerFinished());
+
$dispatcher->dispatch(new SessionFinished($result));
return $result;
});
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L142
Escaped Mutant for Mutator "LogicalAnd":
@@ @@
# An empty run — no tests found, or every test filtered out — verified nothing, so it is
# not a success. Flag it as Risky (unless something already failed) so every reporter and
# the process exit code signal that the run was not normal.
- $status === Status::Passed && $summary->total() === 0 and $status = Status::Risky;
+ $status === Status::Passed || $summary->total() === 0 and $status = Status::Risky;
$result = new RunResult(
$suiteResults,
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L134
Escaped Mutant for Mutator "UnwrapArrayMap":
@@ @@
}
$duration = \microtime(true) - $duration;
- $summary = Summary::combine(\array_map(
- static fn(SuiteResult $r): Summary => $r->summary,
- $suiteResults,
- ));
+ $summary = Summary::combine($suiteResults);
# An empty run — no tests found, or every test filtered out — verified nothing, so it is
# not a success. Flag it as Risky (unless something already failed) so every reporter and
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L133
Escaped Mutant for Mutator "Minus":
@@ @@
$suiteResult->status->isFailure() and $status = Status::Failed;
}
- $duration = \microtime(true) - $duration;
+ $duration = \microtime(true) + $duration;
$summary = Summary::combine(\array_map(
static fn(SuiteResult $r): Summary => $r->summary,
$suiteResults,
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L126
Escaped Mutant for Mutator "Continue_":
@@ @@
},
);
if ($suiteResult === null) {
- continue;
+ break;
}
$suiteResults[] = $suiteResult;
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L115
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
# run a separate container scope to isolate services and plugins.
$suiteResult = $container->scope(
static function (Container $container) use ($filter, $config, $suiteProvider): ?SuiteResult {
- # Apply plugins first to have all interceptors before suite files scanning
- self::applyPlugins($container, self::resolvePlugins($config->plugins, SuitePlugins::class));
+
if (null === $suite = $suiteProvider->findSuite($config)) {
return null;
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L109
Escaped Mutant for Mutator "Foreach_":
@@ @@
# Iterate and run Test Suites
$suiteResults = [];
- foreach ($appConfig->suites as $config) {
+ foreach ([] as $config) {
# Resolve a Test Suite from config and
# run a separate container scope to isolate services and plugins.
$suiteResult = $container->scope(
@@ @@
if ($suiteResult === null) {
continue;
}
-
$suiteResults[] = $suiteResult;
$suiteResult->status->isFailure() and $status = Status::Failed;
}
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L101
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$dispatcher = $container->get(EventDispatcherInterface::class);
$dispatcher->dispatch(new SessionStarting());
- $dispatcher->dispatch(new WorkerStarting());
+
$suiteProvider = $container->get(SuiteProvider::class);
$status = Status::Passed;
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L100
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$filter = $container->get(Filter::class);
$dispatcher = $container->get(EventDispatcherInterface::class);
- $dispatcher->dispatch(new SessionStarting());
+
$dispatcher->dispatch(new WorkerStarting());
$suiteProvider = $container->get(SuiteProvider::class);
|
|
Infection (PHPUnit mirror) PHP8.4:
core/Application/Application.php#L96
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
{
return $this->container->scope(static function (Container $container): RunResult {
$appConfig = $container->get(ApplicationConfig::class);
- self::applyPlugins($container, self::resolvePlugins($appConfig->plugins, ApplicationPlugins::class));
+
$filter = $container->get(Filter::class);
$dispatcher = $container->get(EventDispatcherInterface::class);
|
|
Infection PHP8.4
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L97
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
}
\mkdir((string) $path, 0755, true);
- $io->success(\sprintf('Created %s/', $path));
+
}
/**
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L96
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
return;
}
- \mkdir((string) $path, 0755, true);
+ \mkdir((string) $path, 494, true);
$io->success(\sprintf('Created %s/', $path));
}
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L96
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
return;
}
- \mkdir((string) $path, 0755, true);
+ \mkdir((string) $path, 492, true);
$io->success(\sprintf('Created %s/', $path));
}
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L93
Escaped Mutant for Mutator "ReturnRemoval":
@@ @@
private static function ensureDirectory(Path $path, SymfonyStyle $io): void
{
if ($path->isDir()) {
- return;
+
}
\mkdir((string) $path, 0755, true);
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L82
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$io->note(\sprintf('Left existing %s untouched.', $configPath));
}
} catch (\Throwable $exception) {
- $output->writeln('');
+
$output->writeln(\sprintf('<fg=red>%s</>', $exception->getMessage()));
return Command::FAILURE;
}
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L73
Escaped Mutant for Mutator "ReturnRemoval":
@@ @@
# Non-interactive + existing config: bail out before touching the file.
if ($configPath->isFile() && !$input->isInteractive()) {
$io->warning(\sprintf('%s already exists. Skipping (non-interactive mode).', $configPath));
- return Command::SUCCESS;
+
}
if (self::writeConfig($configPath, $srcPath, $suites, $io)) {
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L72
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
# Non-interactive + existing config: bail out before touching the file.
if ($configPath->isFile() && !$input->isInteractive()) {
- $io->warning(\sprintf('%s already exists. Skipping (non-interactive mode).', $configPath));
+
return Command::SUCCESS;
}
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L63
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$srcPath = self::discoverSourceDirectory($input, $basePath, $io);
$testsPath = $basePath->join('tests');
- self::ensureDirectory($testsPath, $io);
+
$suites = self::discoverSuites($testsPath, $io);
$composerKeys = self::updateComposerScripts($suites, $basePath, $io);
|
|
Infection PHP8.4:
bridge/symfony-console/src/Command/Init.php#L58
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
try {
$basePath = Path::create((string) $input->getOption('path'));
- self::ensureDirectory($basePath, $io);
+
$srcPath = self::discoverSourceDirectory($input, $basePath, $io);
|
|
Infection PHP8.4:
bridge/rector/src/Testing/TestRectorFixtures.php#L43
Escaped Mutant for Mutator "UnwrapArrayValues":
@@ @@
{
$this->paths = \array_map(
static fn(string $path): Path => Path::create($path),
- \array_values($paths),
+ $paths,
);
}
}
|